OK, think about this idea that sharing salary information is akin to dropping your trousers--a socially unacceptable display of something private.
Who benefits from the secrecy? Who does the idea that it's all private, actually protect?
Once at an hourly-wage job I inadvertently blabbed my own pay rate. This pissed off a coworker so much he demanded, and got, a raise. He'd been there longer, knew more, but was earning less. Salary secrecy harmed him, but saved our employer money. For a while.
I think salary secrecy comes from the knowledge we all share that there's rarely anything fair about earnings, and even when their is, humans are envious. So talking about it will just upset people. But do we want to reinforce the unfairness, by keeping our lips zipped? Why all these money taboos?
Since I'm paid with tax dollars--I still work in education, for a little while longer--my salary is public knowledge for interested parties. It's in the top 10% in Canada now, nearly 50% above the median at the moment. Sometimes I do share the amount and people sometimes do get cranky--so I tell them, you're right, you should go for it and get this job yourself. It's pretty sweet." At that point they often say, "forget that, I would never want to do all the school you did and then risk ending up where I started because it's such a competitive field." So there's a recognition of something like fairness. Maybe this moderates the envy. But in the end . . . who's served by all the secrecy?