Salary is just one part of total compensation. It's also pretty normal, at least in my experience, to know what your competitor is paying. In my field we are often poaching talent from each other, so closing a deal often comes down to not only a bump in salary but to better benefits and work conditions, say more PTO, higher bonuses and/or less amount of travel.