it's another data point in a negotiation.
Why can't you just ask your peer? "Hey peer, what is your salary?"