I think you are looking at the cost of generic prescription drugs vs their generic OTC counterpart. When a drug is first invented it is patented, not generic. The drug company has to look at whether to apply for FDA approval as a prescription or OTC. Most often drug companies look to get approval as prescription, because that is more profitable for patented drugs.
Once the drugs move out of patent, that doesn't mean it is automatically approved for OTC sale. A drug maker can look at getting FDA approval for making it OTC. But it costs time and money to do so, with no guarantee of success. In the case of Norgestrel it took until now before any drug maker thought it would be worth pursuing.