You are so right. I started with my last employer in 1987, and worked my way into being virtually irreplaceable, by way of experience and hard work and long hours. In 2012, after 24.5 years, they decided to ditch me anyway.
My division of a large corp had been sold to a larger corp in 1999, and part of the sales agreement was that legacy employees would keep the same retirement benefits, which included half again pension after 25 years.
I had my revenge for the layoff when the TWO young women they hired to replace me both quit in less than 30 days, complaining about overwork.
How did you get your revenge?
Did anyone call to beg you to come back?