But Daraprim is not sold in a free market. The pharmaceutical industry is largely a non-contestable market where a few large firms exist because of high barriers to entry, such as onerous government regulation. Added to this is the fact that Shkreli has a coercive monopoly on Daraprim, not because of patents (the patent on Daraprim expired long ago) but because few other firms want to make the drug since the government-imposed costs make it less than profitable.
What this means is that the prices of pharmaceuticals like Daraprim are not set by the free market. The free market isn’t the reason Shkreli was able to raise the price. In fact, if he had to sell his product in a truly free market environment the price would likely remain low. And even now, if he continued to keep the price high, some enterprising pharmaceutical company would start making Daraprim themselves, increasing the supply and lowering the cost.