You're paying for the brand. IM-branded races are protected by WTC or whoever they're called, and like any brand its there to make money - whether this benefits the sport or not is up for discussion but that's the principle.
The organisers will say that by entering a IM-branded race you're also buying assurance of quality.
Plus, it seems to be widely accept that in order to call yourself an 'ironman' (tho why one should wish to do this in public I have no idea!), you need to have completed an IM-branded race within the cut-off. Plenty of people want this kudos, and high demand = charge a lot!