This, 1000 times this. I have said this and seen it so many times (I work in diligence looking at companies). The big sin in tech is over-hiring to look like success. This is the act I consider reprehensible - making people believe they have a career when they got hired at an unsustainable burn rate to make number go up on an investment slide deck - fully aware that post-transaction (sale to next investor) half of them get the headsman's axe.
When I'm evaluating whether or not I want to take a position at a company, once of the things I look for is that company's history of layoffs. Some companies have a habit of engaging in them, and I prefer to avoid them. In part out of self-defense and in part because I think it's indicative of a general business mindset that I wouldn't get along with.