Autozone

I certain will not dispute it doesn't happen and that it does indeed continues to happen. That sucks what happened to you and don't agree with it.
I've seen it with the company I work at, there was a guy who was a very senior employee (senior by years with the company) and heading to retirement. He set his date and said I want to be here one more year and they pushed him out. They push out the HR person too who objected to it happening. Senior employees who are up in pay scale get let go because of the the pay scale they are at. If they can replace the $90k a year guy with 6 weeks paid vacation with a $40k guy with 2 weeks paid vacation that's more than $50K profit. I've heard of this across the corporate world. They don't care if they replaced the individual with someone competent either. Its all about the money. Enter the Great Resignation, "here is your 1% pay raise and you should be happy to get it" when inflation and cost of living was more than that.
That's exactly what happen to me after 23 years in the Chemical Division of a Pharmaceutical Company except it was called Re engineering (restructuring) and Downsizing.