Maybe having direct access to work politics provides an advantage? Maybe a manager is able to sacrifice others to avoid being fired themselves? Maybe taking credit and offloading blame is the name of the game?
Thanks in advance for any consideration of this question!
Much more subtle is the relationship you have with the team you're leading. If you have a culture/vibe of mutual trust and respect, and know when the manager helps ICs versus when ICs help the manager, then the line is blurred, and the team kind of sinks or swims together. You're all playing on the same team, and your role is to some extent a metaphor of the team/product as a whole. What is a lead singer without a band, or vise versa?
If you foster an adversarial relationship, or an overly top-down, bossy kind of vibe, that schism between you and your team can devolve into something that won't withstand the downturns. Bad managers and situations lead to finger pointing and nastiness. Who gets canned in that scenario? Depends on the company and the relationship each person has with the folks up the ladder. But before this kind of situation has come to pass, there should have been some red flags raised. As a manager, if you don't/can't get along with your team, you should find a different team to manage, because you can't ever be effective without their support.
Or because their managers are bad, or the company is rife with politics.
BTW if they put the guy on PIP then that basically means they were in the process of firing him already. So if they called it a "layoff" that was for cosmetic purposes.
If you're a CEO planning a layoff, your #1 priority is to minimize disruption to the organization. The worst employee is one who is still on the payroll but demoralized; hopelessness is contagious, so not only are they probably not productive themselves, but they make everyone around them unproductive. If you lay off a good manager, they're gone, but you've also demoralized all their reports. You get the same effect if you lay off a core engineer, one with deep knowledge of the codebase that everyone goes to for questions. However, you can lay off a garden variety IC, one that keeps to themselves and just does their job, without any serious repercussions to the org. And you can lay off a whole division without serious repercussions for the rest of the org, because everybody who knew them will no longer be there. This is why many companies try to structure layoffs as "We are exiting this line of business, and that is why the people who worked there are no longer with us."
The one big exception is executives, who usually have less job security than either ICs or managers. I've heard this as a reason why executive salaries are so high; few qualified people will take the job without the knowledge that they'll get F-U money in 2-3 years, because there's a decent chance they'll be fired and unhireable by then. This also fits into the framework above: typically, when an executive gets fired, it's because the business they lead is underperforming and the staff is already demoralized. At this point you lose nothing by getting rid of the executive in charge, because everyone wants to see him gone anyway.
The same logic applies to bad managers; you can and should fire these quickly, because they demoralize all of their reports.
It occurred to me recently that this may be why we have layoffs at all. The fairest approach, and one that maximizes general welfare, is to give everyone an equal pay cut when the company's revenues go down. The problem is that this demoralizes everyone. The good people will leave anyway, while the bad people will sit and do nothing useful while bleeding the company dry of the rest of its cash. So instead, companies create much greater pain across a smaller number of people, and then ensure that the people most affected are no longer with the company so they don't affect overall company morale. The ones left behind are more inclined to think of themselves as lucky, or skilled, or grateful they weren't the ones canned, which are all positives for performance.
Also consider trades like carpenter or electrician. Many software engineers also like this type of work because it involves building & fixing stuff, but it's more tangible, easy to disconnect from when you're not working, and requires less abstract thought. It still pays very well, though it can be hard on your body.