These companies thrive on three types of arrangement:
1) "Deals with the devil": The company knows they'll be drained for all they're worth, but they planned badly, overcommitted and basically just cant hire the expertise they need to do 'X by Y' any other way.
2) "Screw the cost, just make this go away": It's a big project, management has plenty of money and mostly just doesn't want to think about this project. A big name might cost a ton of money, but you can sue if things go sour and generally shit will be delivered eventually.
3) "A fool and his money part easily": If you got a bunch of money somewhere and have no clue as to how things work, these big boys will diligently take your money, lavish you with nice dinners while they extract every cent of your budget while making sure all the paperworks points to your own incompetence as the ultimate cause for the project failing.
All three types are variants of 'you messed up, now pay the price' and in that they perform a valuablem, if decidedly unglamorous, function in the IT ecosystem.
Right this is usually how it works, and if said consultancy saves the day then the existing management at the company assumes that that consultancy walks on water and keeps shelling out money for the perception that problems will not arise. If they do the process is repeated. What consultancies are selling is an illusion, an illusion that management is willing to pay for so long as the perception is that all is well.
4, The customer is the government. The contract always requires that everything from the data-center to the training is in the same contract so these are the only possible suppliers
They underbid the contact and don't deliver while dumping 1000s of untrained new-grads as "consultants" at $N*1000/day for changes until the project is ultimately cancelled by the next government.