That doesn't explain the behavior of off-patent drugs being jacked up in price on a whim or near identical variants being made to extend patent protection and maintain the predatory pricing of the name brand. Their development costs are already recouped during the initial patent phase. Tweaking things a little doesn't cost them nearly as much.