In reality that’s not what happens. Instead you get rid of teams, roles or high cost individuals. Why? Because it is much easier to deal with the work the let go individuals are doing and it impacts morale less.
I never saw a stack ranked layoff. The closest was demanding teams all lose someone. But that leaves teams with really good people getting rid of good people and teams full of dogs retaining them.
It also sucks for the employee, a PIP is really stressful not knowing what will happen next, will you get fired, should you start looking for a new job.
In addition, the PIP can take months to get to the finish. Maybe even six months in some cases.
A layoff takes way less time, but it does suck for the employee. I don't know which is worse. But if you have a good employer, you still might be able to transfer to another part of the company. Being on a PIP usually means your only choice is looking outside the company for a new job.
Layoffs always hit good and low performers, there is no way it can't. But if a company wants to get rid of a number of low performers at the same time, PIPs are not the way to go.
But with a layoff it's really hard to prove the layoff was targeted unless everyone in the layoff happens to be part of the same protected class.