It does solve a few key problems though. If universities and other research institutions were encouraged to bring products to market, they'd change what they work on and how. Basic curiosity driven research would give way to commercially oriented research. Moon-shots that might take multiple decades to develop would be replaced with things that can be brought to trials in just a few years. Brilliant researchers that might have made multiple earth-shaking discoveries over the course of their careers might get bogged down bringing one product to market. There's a lot to be said for insulating academia from quarterly reports.
However, things go awry when corporations that turn government funded research into private profits start lobbying too much and regulatory capture occurs. Even if it takes a decade to turn novel research into something you can buy at a pharmacy, the debt pharma companies owe to taxpayers should not be lost sight of. There should be stringent regulations on how drugs based on public research are priced. Yes, pharma company investments, market size, projected sales, and all that should be factored in, but drugs based on public research should be made available to the public at reasonable prices. That's not happening in the U.S..
Bottom line, public money must come with strings attached that serve the public interest. Pharmaceutical companies should be under heightened scrutiny and regulation because of where they get their IP.