It's not just "Big Pharma" protecting their patents.
For example: The Cost of Doxycycline Skyrockets
The linky thingy is from about 4 years ago, but it's still true.
The Generic bottom feeders expend zero dollars in research and clinical trials, then they sue the bejesus out of the Pharma companies that have lucrative patents in order to cash in their own fortunes. A bunch of them rush in to the new space, the former patent owners drop out and then a pack of jackals fight over the spoils, and eventually most of them drop out too - leaving that drug available for price gouging by the space victors.
"According to a U.S. House committee investigating price hikes in several generic drugs, the average wholesale price of 500 tablets in October 2013 was $20. Seven months later, the average wholesale price for the same amount was $1,849, an increase of more than 8,000 per cent."
"According to industry experts, doxycycline is the subject of an unintended effect of legislation that created the generic drug industry. When a drug company develops a safe and effective medication, the Food and Drug Administration grants approval. The drug is patented, and the company has the exclusive right to sell the medication for 20 years, to recover the cost of innovation and development, and make a profit."
"Doxycyline is a well-established medication, the first choice for most doctors treating Lyme disease as well as other bacterial infections. It is safe, effective and inexpensive to manufacture. Once more than 20 companies made the generic drug. That created fierce competition. Now there are only three or four manufacturers.
Over the years many companies dropped out of the market to focus on more profitable drugs. A wave of pharmaceutical mergers has also changed the economic landscape. Shortages can be caused by any number of unforeseen circumstances. Regulatory action can force companies to temporarily stop production of drugs. Raw materials are subject to their own shortages and price increases. In one case, damage from Hurricane Sandy forced a manufacturer to stop making doxycycline."