As with most IT boondoggles, there's plenty of blame to spread around from both the management and consultant side of the transaction. Even where seemingly water tight contracts are in place with KPIs, milestones and penalties, sooner or later the sunk cost fallacy will get triggered. The consultants know this, which is why quotes are largely fictitious.
I don't know what the solution is. Having been on both sides of that coin, I've seen how getting customers to come up with a well-defined spec and resisting inevitable feature creep is insanely hard. From the customer side I've seen how eagerly in a competitive procurement process bidders will say whatever the RFQ/RFP requires, and how hard it is to actually verify claims without making the procurement process even longer.
The real problem here is that governments, and indeed many private organizations, have hollowed their IT departments, basically contracting out pretty much everything to outside consultants and service providers. This means there are few people, or in some cases no one, in house that can actually meaningfully assess bids and quotes. You basically have consultants' sales teams both making the pitch and assessing how great it it is, so that they can say almost anything and the elected officials or civil servants, with no direct knowledge of how complex such projects can be, basically swindled by the false economy of the lowest bid.