When markets are the only place to put money that beats inflation, that's where people with money will put it. As more money gets dumped into equities their price goes up. Since those "investors" are just looking to hold the equity until someone else comes along and pays more for it they don't care about fundamentals or dividends.
Some companies have good fundamentals and have done well despite the pandemic. Many more have only gotten by with government handouts. A lot of exuberance today comes from big traders picking up stocks at a huge discount last March. The huge market drops were basically an interest free loan to anyone with enough money to pick up more stocks.
It's a great environment if you've already got money or retired recently with stocks as a large component of your investment portfolio. For everyone else the markets haven't done anything useful, if anything they've convinced low information voters that the economy is doing better than it is.