> They are (correctly) unable to subsidize the cost of development by selling data, which in some cases means they cannot use certain preexisting libraries.
This is not what raises the cost of development. It’s not having any in-house knowledge of software development or even how to manage software development contracts effectively. Most companies that require a lot of software end up building development organizations, because they recognize that paying someone else to do it is more expensive long-term. That’s not an option available to most governments.
It’s possible that this is just an inherent effect of outsourcing but even if it is, it ends up being too inefficient to justify.