No, pharma does what any corporation does: Make a profit. For pharma companies, this requires they trot out new products frequently. This in turn takes big bucks in research and testing to do. That means new products cost a shit ton of money. What many socialized medicine countries do is make deals with the pharma companies to not have them charge off those development costs on them. The subsidize the medicine itself and the pharma company makes some profit off of those sales.
But they still have to recoup the cost of R&D and testing. That leaves fewer countries, like the US, where they can still do that. They try and recoup those costs before the patents run out (about 14 years at most). So, new drugs are ungodly expensive. They then hide those costs by government subsidy and insurance plans that spread it over all their customers even as only a few might use the drug.
Thus, the big hit from pharma companies is government regulation and the market being indirect, so end customers really don't see the true costs. Yes, there are some pharma companies that look to gouge the market but those usually find out PDQ that it won't work or last.