Wouldn't it be interesting to know that you had received a higher offer than your peers because the company wanted to hire you that much?
Or that you were lowballed but your negotiation skills brought your salary in line with averages?
Or that you are being paid 30% less than the other members of your team doing the same job?
All extremely relevant things to learn.
If you are happy with your current compensation (and I appreciate for some that won't be the case), then do you really want to know? Would you want to go from ignorant bliss to questioning either your own negotiating abilities or the value the company has for you?
I suspect the answer to that depends on the type of person you are, and I don't pretend there's a right one either!
Salary is tied up with ego and emotion, and self-worth, and a person's assessment of how valued they are by their organization. If a person can evaluate this in an objective and cold-blooded fashion, and see things from management's point of view without taking things personally, they can probably stand to know their salary relative to their peers without obsessing about it.
On the other hand, all of us know some people who would obsess and not be able to let it go, and make others' lives miserable about it ("I get $5000 less than that jerk? All he does is browse 4chan all day" "Ha, I knew I was considered more important to this department than Thompson!")