Discrimination in the workplace is COMPLETELY LAWFUL as long as it isn't based upon race, gender, age, disability, religion or sexual orientation. Every employee's contract is entirely independent of that of any other employee (unless 'collective bargaining' has been agreed to or, as with teachers, there are national pay scales).
In the City of London's financial sector (where it's normal for each employee to have a separate contract to those working alongside him) two employees might sit next to each other, doing identical jobs, with one earning £20,000 per year (and no bonuses) while his colleague earns £200,000 per year (with massive bonuses). It's perfectly lawful (and long may it stay that way!).
Chris