Again, that’s not how it works. You don’t lay off bad employees, you lay off randomly or lay off teams you no longer need or want. Layoffs are an opex reduction exercise, not a house cleaning.
That's not always true. Some layoffs cut entire organizational units regardless of individual performance. Others cut a certain percentage across the board (sometimes with exceptions for strategic growth areas). The CEO might tell every manager to cut 10%, and obviously they're going to take that chance to eliminate their worst performers.