One thing that seems to go unmentioned, unless I missed it, is that many of these companies bought other companies and brought over those teams. Initially, they probably needed more members of those acquired teams than they do now that those products are integrated. So layoffs are almost guaranteed in that sense.
Add in higher interest rates mentioned elsewhere, and instead of buying more and more companies (which means you can move staff around to new teams), there isn’t any buying so layoffs are the result.