and the engineers will walk away if they're not paid
A government, or any "large coorporation" renting "talent" acts as a milk-cow. Often alot of money is burned in "processes" which are in place and have become too rigid to operate ^properly without outside influence: you have your internal taskforce doing jobprotection and learning progressively how to avoid to work too hard
Whenever you contract a firm you can put in conditions as penalties. I've seen large firms burn cash in their "penalty period", with teams working day and night for months in order to get prestige (resumé of the company) and often to be selected for follow-up projects. so they weigh the cost against the benefit.
Some projects will go easy and they will be overbilled. Others will burn alot of resources but get carried with the buffer of overbilled projects and secure the future.
For clients this means, they have some "sort of guarantee". If the contractor overestimates his own capacity (buffer cash, their internal talent, projections, ...) or made a proposition to cut short in order to eliminate competing contractors.. They go broke and default.
So the conclussion is; both parties take risk and try to negotiate to limit the risk and to present themselves capable to reduce risk to a minimum. To ensure this, you will have lenghty contracts. In time of excess and big budgets, people will be less cautious and take more space as there is no need to tighten things up as it allows.