How?
Making software for government is like a two year bidding process. The barriers to entry are incredibly high when it should just be a case of, "Okay, you want X Y and Z as your most critical features, let's keep the initial product small, we can add features as we go along. It'll be done in two months and then we'll iterate."
Instead it's more like, "We're going to have bids for two years for the project and then we're going to want everything done in one pass."
The NHS tried to update their computer systems a while back, it cost them £12 billion and two contractors dropped out of the contract because they were being too difficult to work with. It's still not, I believe, fully deployed.
The BBC tried updating their media management system.... DMI, I believe it was called. And spent £98.5 million on it only to not get the product at the end of the day....
All for things that a reasonable software company could probably have done by iterating over features on a basic product fairly easily.
Then you have things like the Police computer system - which is laughable in its antiquity and difficulty to use. I think there was an article on here quite recently about the awful 911 system.
You know? Things need to change concerning regulation before I think we're going to be able to adequately address those sorts of problems. Otherwise you're going to get these monster projects that effectively have to be done all in one go, which seems like a recipe for disaster.