Meta could build their own cloud offering. But it would take years to match the current existing offerings of AWS, Azure and GCP in terms of scale and wide range of cloud solutions.
There was one manager who worked at two large Dutch companies and sold AWS to them, as in, moving their entire IT, workloads and servers over to AWS. I wouldn't be surprised if there was a deal made there somewhere.
Offering reliable IaaS is super hard and capital intensive. Its also not profitable if you are perceived as shit.
Google started a cloud and their user-facing software is atrocious. Compared e.g. Angular to React, Tensorflow to Pytorch.
Also how exactly they would do it, they don't have enough infra for renting, they would need to x10 what they have now.