actually a difference is also how many players along the supply chain siphon money out of the process. the more greed is allowed and acted on for the treatment, the more expensive it gets. introduce layers of insurances, hedgefonds, pension funds, lobbyism, ... it adds up to riddiculous amounts far beyond the original R&D/infrastructure/treatment costs.
And also downsides, e.g. many treatments just aren't available, and many others would never have had their discovery funded without the market-based system existing.
Governments can (and do) directly fund medical research including drug discovery. This is in part because governments of even just middling competence have an incentive to keep their workforce (which also includes their military) healthy.