If it is completely non-profit and for no other motive than saving lives ... sure.
More generally, (pick your discipline), government has to step in and fund or help fund R&D precisely because it is not focused on the profit motive.
But, they are always focused on the profit motive. A company is not going to develop anything that they know they will take a loss on. They will just jack up the price to the point that it is profitable.
So, you have been forced to invest in a company, that turns around and makes a profit on your investment, without sharing the profits with you.
Why does canada get the drugs so cheaply?