Layoffs started before the rise in llms and all the tooling around coding using llms. They were never used as a justification. What happened was musk bought Twitter, cut 80% headcount and it was still up which showed you can be leaner and other tech ceos took note. That and the stock crashed as we were post COVID bubble.