My experience from an S&P 500 tech company is that people can be laid off one quarter only for new people to be hired the next. The people making those decisions are completely disconnected from the hugely negative impact this has on the company's ability to execute. There was no real need to layoff anyone, there's plenty of cash, it's purely for engineering the business results and ultimately trying to engineer the share price. The people laid off could have been contributing immensely and the new hires contribute nothing if not negative for a while.
Economic cycles are not a surprise, they happen, a company with enough resources can easily absorb them, use the down turn to double down on developing new products, and come out stronger on the other end.
Laying people off isn't always bad, but at least 80% of the time it's the wrong long term decision. You've spent years on these people learning your products and technology, and now all that knowledge is gone. The impact is continuously felt years down the road. The movement of people this and a variety of other reasons is a net drag on companies. This treatment of people as some sort of "resource" that can be scaled up and down on demand is a joke.
All that is not to say that if you have a problem with specific employees you can't fire them, that's a completely different question.
EDIT: Lemme give you another example I witnessed personally from a multi-billion dollar company. Production of a certain (highly complex) product in was moved to Mexico for a projected cost saving of about 5%. The factory was closed, hundreds of people were laid off. Years later the production cost in Mexico was higher than the cost in the original factory and production was moved back. It was absolutely clear the original decision was iffy but it was done for the optics of making it look like the company is working on cutting costs. It impacted not only those people who got laid off but local supply chains etc. Overall a negative decision for the company, the economy, and the people involved, driven purely by bean counters with no clue. If the company did "focus on employees" and really considered the loss of know-how, the cost of recruiting and training people, the loss of trust, the impact on morale etc. maybe we would have had a different outcome.