I found I was being 12% less than my peers. My boss said yes I'll get you a pay rise to match. 6 months later, nothing had happened. It then took me 3 weeks to get another job paying 20% more. When I told my employer I had this offer, all of a sudden the 12% appeared. I said no, too little too late - a few weeks later they said "Name your price" to stay.
Simple explanation: they saved money. Of course now they have to recruit, and then the new person needs a lot f time to learn what his company does (it's complicated). Cost is WAY more than that 12%, but it doesn't show up on the balance sheet.
So to answer OP's question: because companies don't really value their people.