This is pure greed and nothing more.
While that's certainly a part, you're naive to think that's the only thing that allows this to happen.
The makers have a monopoly on the market, supported by the government (read: FDA). It takes $2M-3M to get the FDA to LOOK at your new drug, and a literal semi trailer of paperwork (read: more $$ for lawyers, doctors, researchers, etc). the makers have a corner on the market thanks to the federal government. They're only charging $630 because they can get away with it due to the (.gov supported) high barrier (read: $$) to enter the market. To think it's only greed is naive, possibly stupid. You'd be doing the same, simply because you could and should, were you the CEO with a board of directors and shareholders to please. If you didn't, you'd be replaced as CEO. Welcome to America, "capitalism," and the government mucking everything up.