What you described may be a crazy system that actually works (in a sense), with some clouds on the horizon.
1) Since successful drugs eventually go generic, you could argue that the initial high cost (meant to offset R&D) is temporary while the early users serve as "guinea pigs" who demonstrate safety & efficacy (or lack of) not noticed in clinical trials. In the long run, all is good.
2) As you say, the danger is in the release of expensive drugs with low efficacy, hyped by ads and especially those picked up by Medicare, etc, which raises costs for all of us w little benefit. Yet even this may have long term benefit as again the early users serve as guinea pigs and in the long run better drugs are released using this info, w Medicare upgrading.
3) See how wonderful American capitalism is? Despite the failings, we seem to be the ones producing most of the new drugs, some of which eventually work.
My thoughts as of 2020:
https://scottvern.medium.com/the-dangerous-righty-lefty-pharmaceutical-punch-ef0a4478dc1e