Someone has to pay for the regulatory studies. Someone has to pay for purity. Someone has to pay for marketing, legal, and other corporate overhead.
My understanding is that for drugs with FDA approval, almost all that cost burden has historically been borne by customers in the USA.
Oh, and profit. Ditto