Because "nation states" are not one making decision either. It's done by one specific career bureaucrat or group of them and even best of people who work on such positions usually choose it because of job security and stability.
Spending 10x more on IBM or Palantir can't get them fired, but trying to build something in-house their organization don't have competence for can get them fired.
And this is even if you don't take lobbying or corruption into account.
> It's done by one specific career bureaucrat or group
Almost all governments have a legally defined public procurement framework. If this is overridden, it's pretty much always by elected politicians, not by regular government employees.