On the other hand, if I was a manager at an established company with thousands of workers, I'd be very wary of "just publishing all salaries publicly" even if I did think they were all fair (which I don't believe it's true for most companies, granted).
For one thing, fairness is subjective. For many, "equal pay for equal work" is fair, but many others believe that seniority, or a better CV, or many others factors should be rewarded differently.
Secondly, there are issues of perception. A worker might think (s)he should be paid more because (s)he always leaves later than his/her colleague, without taking into account that the colleague prefers to take shorter lunches or fewer breaks and leave earlier.
You can explain it to them, but why would they believe you?
It'd be different if a company published the salaries from the start, but switching after growing to a huge size can be very disruptive, and I don't blame managers for avoiding opening that can of worms.
(Again, I don't believe the salaries at Google are perfectly fair, I'm talking about an hypothetical company)