They don't. Salaries are typically dictated by the funding agency or the university. Research funding often goes toward purchasing equipment and materials, but the bulk of it goes toward paying graduate student stipends and postdoc and technician salaries.
Typically, the only way a researcher can get "rich" off of their research is if they write a book or go on a speaking tour.
Last I checked (about 3 years ago), the median salary for a full professor in the US was $70k/yr. Obviously, there are regional and institutional differences, but I highly doubt that any professor at Harvard is making in excess of $300k.
Mind you, also, that the average age that one reaches "full professor" is something like 45 or 50. If you want to go down that track, you're looking at a salary in the range of $23k until your mid-to-late 20s as a grad student, followed by a salary of no more than $45k as a post-doc until sometime in your mid 30s. If you are lucky enough to snag a tenure track position by your mid 30s, then you'll probably make around $50k for the next 7 years, at which point you might get a tenured position (which can eventually, through promotions, lead to "full professor"), or you might be sent packing at age 45 with essentially no future on your chosen career path. This is not a hypothetical. I watched this very thing happen to two Ph.D. advisors.
So, no...despite what you might have been told, no one chooses a research career to get rich. (Consequently, I left academia to pursue software engineering and easily increased my expected lifetime earnings by at least 4x.)
These numbers are too conservative. The median salary numbers are biased downward by professors in nontechnical fields. Many professors at Harvard, especially in medicine and law, make more than $300K, but most are probably $100-200K. You can get salary numbers for the UC system here.[1]
On the other hand, you are right that the chances of getting through are very slim, maybe 1 in 20 of those dedicated to try. Professional athletics is a safer career move. :)
That's actually a very cool, very useful tool. Thanks!
And yes...for the top-level number I was guestimating. Still, if the top paid professors are in Law and Medicine, consider that these areas are the top paying non-academic professions. In other words, those professors are still taking a major hit.
Typically, the only way a researcher can get "rich" off of their research is if they write a book or go on a speaking tour.