But upgrading technology requires government administrative capacity. That's generally cheaper than outsourcing technology development to third parties, but does require a commitment to try to understand the thing you're managing.
Politicians don't hire competent administrators because they believe that building a solution yourself and buying a solution from a contractor are basically equivalent, which anyone on this website can tell you is not true. This is an easier problem to solve than most think, but it's not trivial. And it's really hard when you have clowns like Elon Musk purposefully destroying institutional knowledge for no good reason.