Not PP, but in countries where there is employment protection, a company can still officially downsize and make roles redundant and therefore layoff the people in these roles. Those in now redundant roles can technically apply for any new open roles created but either there aren't new roles or management has a good idea who it wants to be in that role.
This is actually similar to a lot of tech layoffs, where the company is laying off a large number of people to downsize the company and not rehiring other people into those roles.
Where employment protection and unions come in is areas like redundancy pay offs, including potentially retraining; and ensuring that redundancy is not used to target individuals (e.g. making a role redundant to lay someone off and then recreating that role to hire somebody else). If you want to fire somebody there needs to be good cause. Otherwise you "manage them out of the business" by making them unhappy whilst not performing constructive dismissal.
This was all a lot of hassle when I was running teams but on the upside, as a manager I was also just an employee and protected by the same laws.