How do you know the up-votes on a StackOverflow answer were not fake/bots/paid for? How do you know a GitHub starred/watched repository is really useful and not some job applicant's astroturfing campaign to make it look like their code is widely-used?
>How do you know the up-votes on a StackOverflow answer were not fake/bots/paid for?
Because the quality of the top voted answers speaks for themselves in 99% of the ocassions.
I disagree, I find surprisingly often, the top one or two voted answers have low quality in many of the types of searches I end up doing on StackOverflow. Ultimately, it ends up being a resonable ranking when you have a smaller set of answers, and a good mod(?) community that's effective at filtering out actual spam.
Sometimes a longstanding answer has so many upvotes that it stays at the top even if it's no longer the best answer. In cases like that, there's usually a comment that explains why that method is no longer preferred and what you should do instead -- sometimes pointing to the better answer. And if no such comment exists, be kind and add it.
Or maybe you can and I'm missing a business opportunity. A TAOCP+OraclePropaganda bot sounds like something that might make bags and bags of money.