In some European countries protection is even stronger. If a position becomes unnecessary, you first have to try to find another position within a company that requires a comparable level of education. You can only fire people for grave negligence or for violating rules, or lay them off e.g. if your company has to in order to survive.
From what I have heard (but IANAL), Germany has weaker protections (which is relevant here). Also, typically people sign away their rights, trading them for a good payout + a good recommendation for a next job.