So this question is exactly the question people should be asking; its perhaps the most important question and few people are asking it.
You're exactly right to be concerned, if this was OpenAI or Anthropic or xAI. In essence these companies are announcing multi-billion dollar deals to build data centers that can't be built, to buy GPUs in a volume that can barely be made, requiring infrastructure that hasn't been built, to build compute power that may or may not be needed, for a market that hasn't yet been proven.
In OpenAI, xAI, or Anthropic's case, they need to build big data centers. There's a general consensus that bigger compute is needed for more accurate model training. I saw a good analogy the other day; in essence LLMs work on relative location to other words in language. For example, to know any point on Earth, you need two relative data sets - latitude and longitude. Throw in altitude and you get a pretty darn accurate map of the Earth. LLMs use that similar logic, but with tens of thousands of data points per word. To use the mapping analogy, the finer you slice latitude and longitude, the more inaccurate it's going to get. So for example, GPS can find your phone pretty accurately with the granularity we use today, but if it had to catalog every grain of sand with latitude and longitude, it's going to make mistakes as that is too granular.
So if you build a much larger data center, and go from tens of thousands of data points per word to millions, then the theory is you get far more granularity and can improve accuracy. There are some disputing this, saying that the data math doesn't work out that way, but it's the logic behind big data centers.
The startups like OpenAI, Anthropic, and xAI, don't have cash to pay this. So they do this in exchange for equity, or in deals for equipment. So for example, nVidia invests $10B in OpenAI, but it doesn't give cash, it gives GPUs. Say they're priced at $10,000, so it's giving OpenAI 1,000,000 GPUs for a $10B investment. The trick is it probably cost nVidia $2,000 to make each GPU, and if OpenAI goes public at a higher valuation than nVidia's "investment", let's say 3X, then nVidia gets to recognize a "sale" of $10B on $2B in cost and $8B in gross margn, marks the equity on it's balance sheet, then sells it for say $30B, recognizing a $20B gain. nVidia's got the cash, so it can weather this, but if OpenAI crashes it'll drop nVidia's stock and create a major write-down. This is the big concern, because if there is a drop in value and OpenAI can't pull off it's lofty aspirations, it'll bring down the value of many entities at once. ANd i would say that's a higher probability than we would like, because OpenAI has yet to prove a model where it can sell a product with a positive gross margin, it's conversion rate from it's free to paid is atrocious, and it's operating costs are enormous.
So the startups are a serious concern because of how they're financing these things. It's all equity transactions and "future promises" which create "accounting" revenue and value, but not real cash.
Now let's get to this story. Meta, Microsoft, Alphabet, these guys are different. They are building the data centers, but the difference is, they have other products which print money. While this is $27B contract over 5 years, Meta has $87B in cash on the books right now; they can pay for it. And notably it's not for building data centers, this is for contracting time on other people's data centers; Meta is making it other people's problem to build, own and operate the data centers, it's focused on training it's model. I think that's important, because data centers take about 5-7 years to build (the backup gensets for example are 90 month lead time), by that time others will have come out with dedicated AI chips, nVidia GPUs won't be the only chip on the market ideal for LLMs. So they won't be saddled with legacy server hardware, they can just swithch to someone with the latest and greatest and let infrastructure be someone else's problem. Also, Meta doesn't have to scrape data from the internet (like how Encyclopedia Britannica just sued OpenAI for wholesale copywrite infringement). it has Facebook and Instagram to do that.
But the key is, this is clearly an expensive business to be in. Meta, Alphabet, Microsoft; they all have other revenue streams to support this spend. If they fail at AI it'll hurt their stock price, maybe some people get fired, but the company moves on. Not so with OpenAI, Anthropic, and xAI and some others; this is all they have. And if it's a war of attrition on how much money can be spent to who dominates this market, the legacy FAANG companies can finance on revenue, not equity; they will win that every day of the week and twice on Sunday.
But to fully answer your question, it is insane the size of these deals, but given it's Meta, it'll come from their balance sheet; Meta's got the cash on hand to do it.