> The more an employer has to guess, the more risk there is in hiring someone.
An employees current salary is only barely correlated with a employees skill. They have a multitude of other, much much better factors that they can use to determine if someone is a "risk" or not.
> Also, if you wind up getting a salary that's more than you produce for the company
You are describing something that is close to impossible to measure, for the vast majority of situations. A company does not go around making exact measurements on programmers, and thinking to themselves "Is this person *really 18.2% more effective than the lower paid employee?".
Thats just not how it works. Instead, a person might be 3 times more effective, or half as effective, as the other employees, and salary will be almost entirely unrelated to how much they "produce", which can't really be measure very well anyway.
And this is without even getting into more complicated things, such as sunk costs, and the replacement costs. IE, you may be 10% less effective, but the costs to replace you are equal to 6 months of your salary, so in reality, it makes zero financial sense to do so.
And finally, you are ignoring the fact that an employee can just lie about their previous salary, and there is basically nothing the employer can do about this. I have never, in my life, had someone demand my tax returns, or call up a previous employer to verify my salary, and in many places this can even be illegal. I can just lie about my current salary, and easily get away with, as I have done so multiple times in the past, as well as has many other people that I know.