What really changed things was the end of ZIRP [1] and even then it was opportunistic. Labor costs are a massive cost for tech companies. They have continually tried to suppress wages. In the 2000s, it was the anti-poaching agreement between Steve Jobs, Eric Schmidt and others. In the 2010s, high growth ahnd zero interest meant labor costs continued to balloon.
But then Covid came along and was a massive opportunity. A few companies may have needed to do layoffs but that created the opportunity for everyone else. Big Tech just went full Corporate America with a page straight out of Jack Welch: fire the bottom 5-10% every year. Call it "layoffs". It's a direct pay decrease for those who remain (who get assigned the work). Those are still there won't be asking for raises because they're now afraid of their jobs.
Very little of this was ever necessary. None of the big tech companies ever came close to making a loss. They've remaining insanely profitable, in total and on a per-worker basis. At different times Google's per-worker profit has approached or exceeded $1 million.
The other factor is these companies eventually reached their size limits where antitrust stopped them making any more significant acquisitions.
Consider the timing: this change came in 2017. Where were the mass layoffs in 2018? 2019?
Also, the 2017 tax cuts contained a massive tax holiday for the repatriation of foreign profits.
Mass layoffs are simply wage suppression. It's the end state for any company that can't keep growing the way the market demands: eventually it comes down to cutting costs to make those quarterly profit targets. And in that, they sow the seeds of their own demise.
[1]: https://en.wikipedia.org/wiki/Zero_interest-rate_policy