The S&P500 is not an index of the entire economy. It's heavily weighted towards the tech sector.
The hardest hit businesses (retail, restaurants, service) were small parts of the S&P500 because they usually don't have the economies of scale that tech has, and therefore don't produce the mega-caps that dominate the S&P500.