It's a common tactic to take an old generic off-patent drug that's incredibly cheap, and tweak it just a bit to make it enteric coated, or a hard slow-dissolving extended release pill, and then throw the $100 per pill new wonder drug pricing on it.
Sometimes it's even just an unusual dose size, where 10mg and 50mg are common, but nobody makes a 35mg, so someone produces it, and charges exorbitant prices for it.
Presumably most of these are tactics hoping people just pay their copays at the pharmacy and never pay attention to the actual prices. Although sometimes ER formulations of a drug are a different compound entirely, and break down into the actual desired drug in your body, and I'd assume that's about as expensive to design, test, and get approved as a completely unique drug.
I actually sympathize with brand new high-tech drugs costing hundreds per dose, or thousands for a month's supply. On cost basis and a modest margin, after a decade-plus of development and testing, then FDA approval, cheaper prices probably would be a net loss. And people without the means to pay or who would die, they have back-channel discounts through the company directly, their doctor, drug reps. even.
Download the GoodRx app, look up the drug when your doc mentions it, and discuss generics and alternatives like prescribing 2x the pills at 1/2 the dose when it's cheaper. Normally, a good physician does this anyway.