My point is that what two consenting adults contracts is part of their privacy unless you're an authoritarian State.
If you think salary being private data is the obvious assumption, then think again, maybe you have been conditioned by years of employment in the private sector to believe that salary is private data. In many cultures and in many type of jobs, it is not considered private data.
You can choose not to be part of that corporation.
That's the issue here. You could be working for a company and never know you're being grossly underpaid until Bob casually mentions his salary being 15-20k over yours despite joining at the same time.
I don't see how making everyone's salary public will help more than knowing the average/median etc.