Because throwing away serial data without any regard for what is there is generally considered "stupid as f&%k" and the people who wrote the language weren't generally that stupid. If you're throwing away random amounts of data you should at least be looking for valid packet start markers while you do it. But really, if you find yourself just blasting through throwing much away then you probably have a seriously flawed program or protocol and you should really fix that first.
Random data which made its way through 8N1 encoding when your RX receiver was listening to data on a bus intended for another receiver.
If you are throwing out the whole buffer, how do you know where the random data ends and the good data starts? I'll say it again, throwing away data without knowing what it is that you are throwing away is foolish. I'm sure you'll find some corner case where it makes sense to you, but it is still foolish from a design perspective. If your receiver is picking up random garbage from some other bus that it wasn't supposed to be listening to then you have a design issue, not a need to throw away data.
If you've got a side channel that tells you the data is garbage then why are you putting it in the buffer? Why aren't you tossing that data as it arrives? You're wasting resources. I'll get someone competent to write this. Better luck next time.