Thinking About Stock Market Volatility

What caused the stock market to rise by over 20% in the second quarter of 2020 even as the COVID pandemic was out of control? How about the over 11% rise in the fourth quarter of 2021 as inflation ticked up and the Fed was warning of rate increases? It seems a little more obvious why the US stock market has fallen in the first 6 months of 2022, but should it have fallen more…or less?