First, priorities and roadmaps for collaborative software development tend to be captured by the biggest and best funded government organization involved. A famous version of this is that the US government effectively drives the roadmap of international software development collaborations by virtue of readily spending money that their partner governments can't or won't match. The effects of resource disparities in development collaboration often lead to the practical effect that smaller organizations are not having their needs met and what little resources they do have are consumed by the overhead created by the resource scale of the big partners.
Second, quite a lot of proprietary software development within government has strict dependencies on closed source software for which there are neither open source equivalents nor likely to be open source equivalents for the foreseeable future. In these cases, open sourcing the government code generates relatively little value for other contributors while incurring the significant operational overhead that is inherent in open sourcing software.
Third, even in cases where the government software is open sourced, the projects are frequently unusable by other orgs because the software is effectively unsupported. Under government rules, you generally aren't allowed to spend a couple hours helping any random dev that emails you on what is essentially a support issue -- you are expressly not being paid to work on unrelated projects. A lot of government code that is open sourced is de facto abandonware, including much of the software I worked on, because there is no framework to provide support for the user base either formally or informally. Unlike with non-government open source, which tends to be responsive to random questions from the ether, emailing devs on government open source projects often goes to /dev/null.
I agree that the big consulting primes do a terrible job at software delivery but government doesn't have a good track record of effective open source software development either, for other structural reasons.