It's a combination of Covid over hiring, CapEx for AI hardware, AND you don't need as many software developers anymore per product.
COVID is now ancient history and there have already been several years of big layoffs when every time I hear the attempt of explaining them through COVID over-hiring.
That may have been right a couple of years ago, but since then every company that had over-hired must have already disposed of the surplus.
My impression is that the current trend for layoffs only really began around early 2025. For reference, the layoffs during the dotcom bubble I was told took around 2 years to plateau
If they can't forecast demand or headcount they should be replaced by confident sounding AI.