A lot of functionality can be decoupled from anything that needs to be classified. A HUD is a HUD and no one should be hard coding in performance characteristics of the F-35 into it. I've also worked on government projects and holy crap does the code quality vary wildly, even before you get into "it's still working so deal with the problems, it doesn't have the budget for updates".
Using 'off the shelf' parts/code can save significant time and money. There's a reason subs use xbox controllers. Government websites and data interfaces at the very least should have the audit-ability that open source provides.