All this investment is completely driven by the companies leading the pack. OpenAI and Anthropic have been telling everyone they need to spend hundreds of billions in a few years. Of course they don't, they could do this over 10-15 years and still be profitable. But they're terrified they won't be able to dominate the market. So to dominate the market, they've estimated they need this growth to beat China (and each other). And the US technically has the capital to make this happen, but there's only so much money available to spend. By growing too fast, they spend money faster than they can make it, and the bills are so big that the investors go bankrupt.
That's what happened in the panic of 1873 (railroads instead of AI). That's what's going to happen here in the next 2-4 years.