No one is forcing you to care or to produce any particular level of work. If your job has no growth opportunities and stagnant compensation then you might want to look for other opportunities.
I think the issue here is that you're trying to frame the issue in terms of some sort of concept of fairness. But in reality that has nothing to do with it.
Because people are not perfect incarnations of idealized concepts. Employers are people who exist in society who have concerns beyond the bottom line. That many or well more than most employers have forgotten this fact is at the core of what is wrong with work, corporate America, and capitalism in general.
Put another way, if they aren’t matching inflation, should I reduce the work I do correspondingly?