You're correct in pointing out that people are inherently selfish, however one major purpose of collective government is to do those things which are necessary and not always in-line with selfish motivations. Just as most Americans would be horrified to have their salary posted publicly for fear of stigma, jealousy, reprisals etc, Norway has demonstrated that those fears are unfounded, and salary data doesn't even have the opportunity to save thousands and thousands of lives.