The problem with the profit motive when it comes to developing new drugs is that it motivates the development of the most profitable drugs, not necessarily the ones that will result in the most benefit to humanity.
The other problem is that the pharmaceutical companies spend more on advertising and promotion than they do on development. Every other commercial played when there is no political campaign is for a pill of one sort or another.
One would think there must be a better way, but I'm not sure just what it would be. Government financing of medical research? That would be the obvious alternative, but would likely have some unintended consequences of its own.