Because if everything the government does is open source by default, the standards will be open standards by default. You can then add non-default code (closed source) for some applications (health, military).
Also open source government code means other governments can fork it, overall lowering implementation costs, while still keeping code sovereignty.