My current theory of tech layoffs is that over the last decade or so, churn-inducing practices like stack-ranking have gone out of vogue. One can speculate as to why this happened. Perhaps generational made middle management unwilling to do the dirty work? Nevertheless it happened.
However, companies still want to, and some would argue need to, eliminate low performers, so now they periodically do a companywide reduction in force and frame it with whatever justification is handy, macroeconomic conditions, AI, whatever.
This hypothesis would explain phenomena like companies hiring aggressively during or after a layoff, and why the layoffs keep happening year after year.