Some companies (Genzyme is one example) do a lot of work in the orphan-drug area. Diseases that inflict small portions of the world population. Indeed, rare conditions.
These are often very expensive drugs, since the market is small, they often cost a patient tens to hundreds of thousands of dollars per year for the rest of their lives. These drugs often get extra patent protections and fast-tracking to the market.
These drugs are not created by accident.