The accounting of drugs is incredibly difficult.
If you consider the cost of a drug per unit to be:
Total cost of drug including production and research costs / units sold
Then yes companies sell drugs at a loss.
If you consider the cost of a drug to be:
Production cost of one unit (including labour)
then companies generally sell at a profit everywhere.
However, in many cases, drugs are provided to poor countries as part of the 2.5% of revenue that most organizations spend on charity these days (ala Google). Most companies consider this good branding as it makes it harder to attack them on people dying because they can't afford care.
The US has the worst drug prices even though it doesn't have the highest per capita income because most countries are able to negotiate at a national or state/province-wide level for drug prices. A company is far more willing to sell 2,000,000 units of medication at a smaller price than the small number of units that a particular insurance plan or single hospital would negotiate. It's just not worth the companies time to negotiate over a sale of 10 units.