The true reason why layoffs keep happening as per an ex-Amazon leader
businessinsider.com
businessinsider.com
If the company is large enough and the anticipation of grow high enough there will always be more head count than there is actual work for, and it could be significant.
The point is, hiring in anticipation of growth isn't an expense. It's an investment, in the future. Now if your forecast chanfes and you are anticipating the future isn't so bright then that investment is an expense and it likely needs to he cut.
It's not that these people shouldn't have been hired in the first place. It's that you can't hire a fraction of a person, and then the forecast changes.