The stock market is discounting the ongoing resilience of the economy and corporate earnings. It is discounting that the odds of a recession over the rest of the Roaring 2020s are low. The longer the economy is expected to grow without a recession, the more sustainable high valuation multiples can be, since earnings growth can be expected to justify those valuations (chart).

High valuations don't cause bear markets. Instead, recessions cause bear markets by depressing both earnings and valuation multiples. Corrections occur when widely feared recessions cause valuation multiples to fall. However, those multiples quickly rebound when the expected recession doesn't happen, allowing earnings to continue growing.
The S&P 500 experienced a correction earlier this year. Its forward P/E (i.e., the multiple using forward earnings as the “E”) fell from about 22.0 at the start of this year to 18.0 on April 8. Now it is back above 22.6. Leading the way down in the S&P 500’s correction was a sharp drop in the forward P/E of the Magnificent-7 stocks from 31.0 to 22.0. It is now back at 30.4 (chart).

Usually in recessions and bear markets, the forward P/E of the S&P 500 falls into the single digits (chart). During the previous bear market, the forward P/E bottomed at 15.1 on October 22, 2022. That was a relatively high P/E, which occurred because the most widely anticipated recession of all time was a no-show.