I suspect that most government departments see data centers as a liability and are very happy to outsource to the big providers, apart perhaps from the ones hosting stuff they don't really want you to know about.
It's always better to be able to blame a supplier for something going wrong if you're a senior leader or politician. For some reason, if it does happen no one has to resign.
There is loads of UK Critical National Infrastructure on AWS, probably Azure too. And the Home Office put up £10 million tender to shut down an old data centre not that long ago without a confirmed replacement - https://www.find-tender.service.gov.uk/Notice/018193-2024
Seems like governments, at least ones of the size under discussion here, are big enough to have a general services agency run a consolidated data center for the rest of the government, allowing individual agencies/departments get similar benefits of outsourcing to a commercial entity.