Layoffs are just a symptom. Overhiring and easy money are the cause. Companies aren't there to "take care of you", they aren't welfare departments
They hired a bunch of people who took the money for granted, and at some point that's no longer going to sustain itself