You're right. Doesn't mean there is a general stigma against doing so, is generally frowned upon, and can put you into a position to be fired because of "something completely unrelated but yes, totally related"
It's also moral and ethical. It's the cornerstone of collective action. It is information that can NEVER hurt either you or your coworker, because someone is going to have to justify a salary in one direction or another as a result. Never, ever hesitate to share your salary information with anyone who wants to know.
Ashamed that it's too high? Work to get your coworkers raises. Ashamed that it's too low? Time to open negotiations, either with your current employer or another one.
http://www.npr.org/2014/04/13/301989789/pay-secrecy-policies...