The unspoken part in many of these layoffs, is that hiring people based on 5 back to back zooms, 50% leetcode, 50% STAR-method situational questions, means you have absolutely no idea how these people will actually work in the real world
The CEO isn't an all knowing entity. It's possible they made a judgement call and were wrong.
Would you prefer that companies be absolutely sure before they hire anyone to ensure layoffs never happen? It seems like the end result would be less hiring / more people without work.
OK, so now we're going to fire any CEO that lays off more than X% of the staff? The likely effect will be slower hiring, and less jobs in our economy. Is that desirable?