I've only been laid off once, and it was from one of the top 10 multinational companies in the world. Head office in New York decreed a headcount reduction. I was positively not highly paid and did above average work. I had an excellent relationship with both my direct manager and the country managing director. But my manager's manager disliked me for being outspoken and pushing back on bad decisions. So he made the effort to hit me with a heavy handed legal document and a generous severance payment.
Contrary to common opinion, I think that politics trumps concerns about performance or pay levels.