What I witnessed was a feast and famine cycle. Senior leaders were always ravenous for headcount. In good times they would get it, and allocate it to increasingly dubious ideas. In bad times they would be forced to lay off even more than they had hired. Everyone from the dubious ideas, plus some of the maintainers of business-critical stuff, would be let go. The remaining engineers would (rightly) complain that they were understaffed and bereft of vital institutional knowledge. As times got better the gaps would be backfilled. But the company never had the restraint to stop there, it would just go right back into the cycle.
Add to that a not-invented-here / not-invented-by-me problem. A platform with some warts probably could have been fixed by those who understood it. But those people were gone. So the team genuinely needed larger headcount than before the layoffs, in order to rewrite the thing.
If I had to root-cuase it, it's that senior leaders get no points for delivering outsized results with a small contingent of engineers; their prestige and leveling is all about the headcount growth occurring beneath them. So there's no pushback on headcount growth, until there is.
If a company is going to go bust in 6-12 months and the metrics wouldn't warant further investment. Then the senior leadership may opt to increase the burn rate to run out of money in 3-6 months with the hope that the extra headcount will solve the deathly problems coming up at the end of the year.
At the very least it can help drum up interest from investors based on "look at the new X we shipped, or look at how strong our team is"