Who is earning money when users buy access to a research article?
Regardless of political considerations, the answer to your question is that publishing companies are collecting the revenue from subscriptions and individual article sales. Some publishers are commercial operations, some are non-profit (such as the American Institute of Physics).

The price you pay at this time is related only to the publishing process (organization of submission process and peer-review, typesetting, archival strategies, printing, administration, etc.) and all other aspects of a commercial company including, of course, a margin. Some people have strong opinions about what this margin should be.

The actual research is paid for by other means, including government grants, university salaries, non-profit and foundation grants, funding from commercial companies, etc. If you had to pay for the actual research behind a given paper, chances are it would cost you something closer to 30k $.

There are various other business models for publishing, some where the whole process is paid for by an institution, and is thus free for both authors and readers, some where authors have to pay to publish, etc.

There are important aspects in keeping money out of the editorial board - publisher - reviewers - authors relationship, because it reduces the risk of conflicts of interest (although author-pay open-access advocates think otherwise).

Options to obtain scientific papers without paying (yourself) include: going to the library of your local institution, checking out pre-print servers and government-sponsored repositories or ultimately, contacting the authors to obtain electronic copies. More on that subject in this useful thread.