system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why brand name drugs are so much more expensive than generics

I understand that drug companies get a period of time where only they can produce that drug, and they concentrate on making as much money as possible before the patent expires. However, in the time that they are the only game in town, wouldn't they get more efficient at producing the compound?

Why don't they try to compete in terms of price after the patent expires?
gpt
Producing the drug efficiently is irrelevent for a lot of drug companies.  In fact, there are lots of drugs where a single bottle of the medicine contains under a dollar's worth of the active ingredient.  Rather, drug companies try to make up for other costs.  For example, drug companies must pay the scientists who look for new medicinal ingredients.  On top of that, every drug must undergo testing to be approved by the Food and Drug Administration.  Almost all of the drugs that are tested are rejected at this stage.  As a result, for every 100 drugs the company must design and pay for, 1 will get approved and become profitable.  

So, where do generics come into the picture?  Pretend Company A produces Drug X and gets a patent.  For the next few years, only Company A may legally sell this medicine.  However, once the patent expires, Company B can also start selling medicines containing Drug  X.  However, Company B has taken a shortcut.  Instead of spending millions of dollars to produce a drug, it just copied someone else.  As a result, Company A takes the attitude that it's doing a good thing by raising prices.  After all, their profits go toward research and developing new cures, whereas Company B really isn't innovating.  Patients buy the name-brand drug because it generally has a good reputation and a recognizable name.

TL;DR: Drug prices are related not to the price of physically producing pills, but to the expense of having to research and develop drugs.