I think on some level, they're constrained by collective bargaining agreements. Maybe they hope you've been with the company so long you only see the people around you. Maybe they only see the people around them.
There was a real technical superstar of a guy a few years ago. I didn't work with him, but a coworker did. He went to management and said, "Give me a 17% raise or I'm leaving." They didn't and he did. The fallout was cataclysmic.
I left a project about three years ago, and there was widespread panic when I announced my decision to leave. I took four months to pack things up and leave them in a stable state, but you cannot totally mask the absence of talent. A coworker asked, "Is there anything this program could do to make you stay?" I answered, "No." He said, "How about a 200% raise?" I said, "Oh, I'd stay another year for that." Judging from the fallout over that year, it would have been an efficient option. But they either didn't have the power or didn't have the perception.