This is a very bad assumption. You are ignoring the fact that government includes municipal, county, state, and federal levels of government, and entirely forgetting that most of the software governments use isn't custom-built through super expensive contracts.
Many are purpose-built for government use but are sold to a large number of organizations at pretty ordinary pricing models.