There is another aspect to the question at hand. A random assignment of monies to projects can be expected to fail because the system in place, whatever it is, induces certain behaviors. One wants to design a system so that positive behavior is encouraged and negative behavior discouraged.
In a system of peer review those seeking funds are induced to give their analysis of why their proposed project should be funded and why it is highly likely to be successful. They know that their words will have consequences and that the review will be carried out by knowledgeable people who have assumed a certain responsibility.
But if the system were random, and known to be random, the behavior induced would be quite different. There would be no real need to spend the time and effort to examine and explain the background and methodology to be used and to guarantee that it meets scientific rigor. The consequence would be that many more proposals would be made and most of them would be junk.
With that background, note that the proposals that are actually made to funding agencies are pretty much all guaranteed to be at least adequate. So the peer review boards are choosing from among the best proposals that might be expected, rather from the trash that might be thrown out by charlatans.
This brings me to a thought experiment that I've used in other contexts. Suppose, in a system that repeats, you rank a set of things on some linear scale from best to worst, and you discard the worst. The worst is replaced. This is sometimes what happens in companies that rank employees on some numeric scale and fire the worst performer.
But, if you started out with the, say, ten best performers in the world, your system will only worsen your overall system, since everyone else will be worse than the ten you start with.
Thus the question asked by the OP doesn't occur in a vacuum. Nor, I suggest, can the various proposals be ranked in theory on a best to worst scale. There are too many variables and something better on one scale isn't as good on another. So, while the system has flaws, it is in the nature of the world that some flaws will exist. But a system that induces and rewards good behavior is, in principle, about as good as we can hope for.
The various judgments made by the review boards are, in the larger sense of things, relatively minor.