Customers pay for the compute. There are tons of CSPs selling the capacity to small and large consuming entities alike (both OpenAI/Anthropic + other small outfits we've not heard of).
The fair criticism of the infra $ is where the non-VC non-bank-loan cash stream is, but there could be a lot of B2B deals and e.g. Meta, TikTok and other behemoths do tend to make plenty of money and pay their bills, and have extreme thirst for more AI capacity.
Take Oracle for example (as a whole, not just OCI) - tons of customers who are paying for AI-enhanced enterprise products.
It's still the early days, as the cost of creating software continues to approach zero the rules will change in ways which are hard to predict. The effect this will have on other white collar industries is even more challenging to reason about.