It isn't that simple - Governments require Support, Scale, Stability, and Usability. FOSS lacks in all four, unless someone picks up the Support tab, makes the app scale to several billion people, ensure upgrades don't break functionality, and makes the app actually usable all citizens.
As a consequence, the app may be free in theory, but the Support and other contracts cost a lot of money. As it is often said Linux is free if your time has no value.