The 645D is a discontinued product based on a very old (and also discontinued) Kodak CCD sensor. Current prices are not indicative of manufacturing costs as dealers may just be trying to partially recover expenses on old stock nobody wants anymore.
Suppliers set prices based on industry demand and what their clients (engineering companies) are willing to spend. They sure don't set prices to fool people into paying 22k for a Phase One back.
The Sony CMOS sensor isn't as huge as 60 or 80MP CCD offerings and is based on a cheaper (to make) technology as well, so its price isn't going to be the same as others. What I can give you, are real numbers from the only supplier I found (in a rather quick search, I'm sure there are others) with public pricings:
http://www.digikey.com/product-detail/en/KAF-50100-CAA-JD-AA/KAF-50100-CAA-JD-AA-ND/5256756. Just for information, that
sensor model is without microlenses and with a color filter, as per specs. Yes, it's around 6k per unit, and while there are no automatic price breaks I'm sure that we can work something out.
Considering the supplier has to make its own margin, we can remove a hefty 25% from that price, and another 10% for shipping and taxes. That brings us down to around 4k per unit, which is pretty much in line with one could expect from a medium format CCD sensor with 50MP. Even if you were to strike an awesome deal with OnSemi, I can't imagine that price going lower than 2k per unit, and that is for an off the shelf CCD sensor. The Sony sensor could be half that, and if you factor in additional discounts because it's an old design (though 3 years on sensors is not that old considering R&D takes more time) we can get to sub 1k prices per unit. Keep in mind that silicon wafers are expensive, and they get more expensive the less you make. If you make 100 sensors per year, and a 300mm wafer only holds 8 of them, you get one price as the manufacturer. If you make half the sensors, prices are much higher, and the less you make the more you are impacted by bad sensors.
Credo 50, IQx50 and H5D-50c prices are indeed overpriced if you only consider material costs and a fixed margin, but you have to take into account that while those use the same sensor as the 645z, they are not in the same product category. The 645z can't be (easily) attached to a technical camera, for instance, and it doesn't have the same software stack and color science behind it either. They are different beasts for different people.
I do think MFDBs are overpriced in general, even CCD offerings, but they aren't making outrageous margins like luxury clothing companies do.