The reason is that labs can decipher the drug contents and produce the drugs at a fraction of the cost. Of course, these companies never paid for the research and cost to bring to market.
So yes US citizens end up carrying the cost, but in practicality, a very big number of life-saving drugs originate in US companies. I am definitely not defending these companies just pointing out the basics.
They are often sold by the same companies that make them in the US as most pattens are international. It is really they are expensive because we can and people will pay it.