The AI investment bubble is almost entirely about making long-term, extremely expensive investments. That's what the gigantic datacenter build-out is about, not short-term investments and short-term returns. They're telling everybody, persistently, that they're making huge long-term bets, and the market is rewarding them like crazy. See: Oracle's run due to long-term bets on AI (it's certainly not short-term results causing the stock to do that, their short-term growth has been mediocre).
Amazon for two decades repeatedly told investors they were making extremely expensive, long-term investments in build-out (eg their fulfillment build-out era), where the primary payoff would be far into the future. The market bought into the long-term on the basis that it was attached to Bezos at the center (that he'd be there to deliver that long-term result). The same is true about Elon Musk with Tesla: they have endlessly made outlandish long-term proclamation to drive their stock. Tesla: robot super business, self-driving taxi business, et al - these are 10-20-30 year long-term claims by Tesla and the market has aggressively rewarded it. That's because they think Musk will/might be there to guide it to actuality. In most cases investors don't buy in because they know the CEO & team won't be around even seven years from now.
Markets (investors) reward long-term if they can be made to believe in the long-term. The issue is that most companies are not believable on long-term statements, they don't have a leadership that will be around for any long-term delivery. Buffett, Bezos, Musk, Zuckerberg were/are long-term attachments so the market has been willing to buy in on various long-term bets.