You're exactly right about why companies discourage (or prohibit) sharing salary information. From employers' points of view it reduces workplace conflict. And it lets them get away with paying different people different salaries for the same job.
Would changing this custom be good? Probably.
But, with respect, choose your battles wisely. Are you like Jake and Elwood Blues from the old movie, "on a mission from God?" https://www.youtube.com/watch?v=-4YrCFz0Kfc If so, what will it gain you?
Ask yourself this: If you share this information, will it truly help change this custom? If you're well-known and influential it might. Otherwise, it might just mess up your career a bit. Is it worth the trouble?
There are boards (like glassdoor) working to open this information up. Check them out. Read their mission statements for insight on how they think about this problem.
And think carefully before you share anonymously; some companies monitor their online profiles carefully and may figure out your identity.