A company is not out there comparing salaries with salaries at other companies (not all, anyway). That would be too much pressure on a company to determine what compensation should be for that specific person. Not everyone can get into the top companies, so it's up to the employees themselves to determine what it means to be underpaid.
Yeah, programers move around a lot. I'm not saying don't pay them competitively, but a) you can't compete with Google, and b) there is a huge delta of salaries in the industry.