Public capital markets are also how we avoid improving things to increase margins. Especially in a modern market with shareholders and administration involved, there's little incentive to improve things or even make them human-safe without regulation. It's why stuff like the FDA exists.
Markets have inefficiencies and reflect collective human irrationality (such as underestimating the likelihood you will be in a fatal car crash). But it is trending better - not especially in a modern market. The stuff the FDA prevented when it was first created is much worse than what it has to deal with today because of better information dissemination and a broadly educated population.
I'm not sure who else would be funding pharma research if not people who are giving their money willingly.
I travel abroad frequently and am an EU citizen. Most pharma research is not funded by the government, in Europe or the US. The EU free rides off of American drug R&D, this is well-studied.
No need to be snarky and sarcastic just because you are having trouble explaining your point.