In short, it's price controls. Here's an excerpt:
In general, truly persistent shortages will only occur when the product-makers cannot increase the price they get for their finished product sufficiently to keep up with a rising cost of production. In this case profit margins shrink or even become negative, and the incentive to expand production, or even to stay in that business, disappears. This is a true shortage – the demand is still there, and customers are willing and able to pay the price being asked, but the product-makers are no longer able to supply the product at that price. Unless the mismatch between the cost of production and the price of the finished product is repaired, the product shortage becomes persistent or even permanent.Furthermore, Dr. Fogoros explains how changes in the law in 2005 have had a predictable effect leading to ever-worsensing drug shortages that have now hit a crisis in 2011. For this reason, the Obama administration's proposed "solutions" will not alleviate the problem, because they do not address the root causes. The basic laws of supply-and-demand cannot be overruled by political fiat.
Such a persistent cost/price mismatch does not occur in a free market. It occurs when some Central Authority acts to control prices (often, to be sure, while simultaneously acting to increase the cost of production). A Central Authority can cap effective price a product-maker can get for his/her product by implementing overt or hidden price controls; by increasing marginal tax rates high enough to push the product-maker’s risk/reward calculation to favor inaction; and by instituting windfall profit taxes that do the same thing.
(Read the full text of "What's Really Causing The Drug Shortages".)