Someone I'm very close to had worked for her company for 15 years. Changes in the company direction, which may or may not be right for the company, limited the opportunities to grow their career to the point where it was clearly better to seek opportunities elsewhere. The company's needs had changed, and the employee didn't want to fulfill the role they now needed. A severance package was provided, no one walked away entirely happy but no one walked away bitter, either. This is how it's done correctly.
Addressing the point made above, severance packages are not mandatory, and acceptance of them isn't mandatory either. The entire point is the company wants to indemnify themselves and is providing some kind of value in order to obtain that indemnification. Severance requires agreement from the employer AND the employee. I've known people who refused the severance and preferred to litigate. Sometimes it worked out better for them, sometimes it didn't.
I've seen a lot of replies today where I hope very much I never, ever have to work with the persons who wrote them.