This captures the problem I have with this system. The wasted effort is absolutely immense. Rejected grants do come back with comments so you can try to fix the perceived problems. You can also consult with the NIH about how you can improve. But sometimes your idea is just not going to get funded.
The current pay line is about 12%. On average a researcher is going to end up failing 7/8 times. They are going to waste years of effort going back and forth to get a single R01. I don't remember the statistics but it is something like 8-10 years for a new professor to land their first R01. At my institute, you are basically required to have 2 R01 grants to keep things running. That means your job is not to do science at all, but to be a grant writing machine that gets enough funding so your lab can do whatever it is you want to do. On some level academic science is really marketing your brand of science.