Part of the problem is that a government agency is encouraged to "reign in costs" by having fixed-price contracts. However, for a large systems it's very difficult to define a sufficient system up front because of the complexity involved.
The Extreme Programming movement is partly a result of a backlash against "big design up-front", by the way.
So when it's ordered as a fixed-price contract, unforeseen needs are inevitably going to pop up. Well, these result in cost overruns.
I don't know of any easy fix for this kind of problem. It's hard to codify and quantify the unknown. It's possible to include a rate-per-hour of additional work in the contract, but then the boundary of what's part of the "original" product is usually fuzzy.
If the rate is not profitable for the vendor, they will complain that the new requests were not part of the original project and that the customer is just mooching to get subsidized add-ons.