If you want my opinion, though, it's easy with the benefit of hindsight to say they shouldn't have. But some industries were, in fact, thrown several years into the future and there wasn't a compelling reason at that time to assume they'd just fall back as things returned to normal. Others should probably have reasonably expected growth to slow down (or reverse) as people could get out in the world again. I don't think there's one broad answer to the market overall.
Frankly, it's a little odd to me that we would expect companies to just be able to weather whatever the economy throws at them with no changes needed. Companies fail. They grow, they then shed headcount. Sometimes its right, sometimes its wrong. But I'm not sure how we could ever live in a society where there could be a complete upheaval to entire industries over a single quarter, and then again 2 years later back in the other direction, and everyone trucks on like nothing happened.
When running a business, it can be entirely reasonable to invest in something you think is unlikely to actually happen if the potential reward times the low chance is greater than the cost.
If you strip away all the bad armchair economics, I think what people are really upset about is the idea that gambling with people's jobs is an acceptable cost.
The real question is "should we tolerate shedding jobs" and it's an interesting question. Without stating a personal opinion on the matter, it's interesting to think about how drastically this would shift the economic structure of the nation if the answer was "no"