My theory is that American's believe the ability to assess your own salary and worth is largely part of the attributes of success and worth. Other countries believe more in the employer to define this.
Cool fact - In Norway, everyone's income is public domain: http://skattelister.aftenposten.no/skattelister/start.htm
In Norway only a few years worth of data is available on line (2007-2010 IIRC) -- after a bit of future shock an amendment was passed to prevent newspapers etc to archive the data and make it available in perpetuity on line. The original intent of the law (when the lists were published in local newspapers) wasn't for the data to be used for other purposes than to check what your peers, your boss, or the prime minister (and other politicians, effectively employed by you) were making.
This whole thing about not discussing compensation seems silly to me -- the only thing I can see come from it is a sort of prisoners dilemma wrt compensation. Your employer knows what everyone's making, but you only know your own salary. End result: Your employer has a stronger bargaining position than you. The whole thing falls apart in the face of unions, of course -- as the union will know what everyone is making anyway.
Either way I think the compensation given to leaders in a company should be know at least internally. Unless they get an unfair share, in which case something should be done either way.
But we are rather strange here in Norway; on a related note, a left-wing newspaper recently made a small splash with its flat salary structure -- everyone earns the same salary, only modified seniority:
I'd say it varies from person to person though because me and another guy at my department managed to get others to open up just by being open about it ourselves and joking.
The sad thing that some people can't endure that without turning it into a pissing contest for some sort of imaginary alpha-male position.
It's very much about context - there are situations/people with whom I wouldn't mind discussing it, but there are also situations where it would be clearly awkward.
Same in Washington: http://data.spokesman.com/salaries/state/2012/
Same in California: http://www.sacbee.com/statepay/
Same for Indiana: http://www.in.gov/itp/2406.htm
I suspect there are online databases for most states.
I have to admit to looking up people I know, celebrities, and others on the tax lists. More out of idle curiosity rather than anything else.
I think that a big part in the general attitude is due to the very high tax evasion rate here. Many people have something to hide about their revenues...