Why? Different people bring different value. The same title can have wildly different roles, some positions with the same titles can be much harder to replace than others.
For example: at my company my team has a very specialized role that is far outside the domains of all other developers (we're talking about a large multinational here, with thousands of employees). You bet your ass we make a decent chunk more than most other devs, replacing any one of us would cost a ton of money and require over a year of learning about our stuff; replacing one of the devs who works on our main product? In half a year you could get someone to full productivity.
In other words: some employees are more expensive to replace than others, either shower them with €€€ or pay a much higher cost when they go work elsewhere.