Knowing a candidate's compensation history can save an employer a significant amount of money which they otherwise might've spent on the same candidate. This gives them an unfair advantage, and the way I see it, it's unavoidable to remove this advantage. By restricting employers from asking about previous compensation, we're just shifting this advantage to the employees, for better or worse.