It's very common that people with similar skills have different salary, especially in a big company.
Big companies have the rules in salary increase rate for the current employees, but are willing to pay more to hire new employees from other companies.
For example, A's salary is $5000 and yearly increase rate is 5%. Two years later, A's classmate B is hired. B's salary is $6000. A's salary is $5512.5.
Similar thing happened to me. Luckily I got an exceptional salary increase years later. But eventually I left that company after 6-year service.