I can provide a real-life (tongue-in-cheek) example in which knowing what your coworkers make may lead to a 'hostile' work environment. I work for a state agency in which all our salaries are public record (and made quite available to be searched for on the local newspaper's website).
There's two developers in our mixed group, of which I am one. The other makes a moderate amount more than me. However, he is much more senior than me, and to be honest, a better coder too, so it's understandable. My gripe is that I think we're both underpayed and I think we both deserve a healthy raise. I wish he was motivated to ask for one instead of just taking the yearly cost-of-living increases so that I might ask for one myself. And that annoys me greatly sometimes. I have yet to be hostile though. :)
There's two developers in our mixed group, of which I am one. The other makes a moderate amount more than me. However, he is much more senior than me, and to be honest, a better coder too, so it's understandable. My gripe is that I think we're both underpayed and I think we both deserve a healthy raise. I wish he was motivated to ask for one instead of just taking the yearly cost-of-living increases so that I might ask for one myself. And that annoys me greatly sometimes. I have yet to be hostile though. :)