No one said that you should take whatever the company offers and just be happy; that would be ridiculous. In fact, as someone who's weighing multiple offers right now, step one is negotiating with these companies to see who can meet my needs and, after that's met, see who can better meet my wants.
However, after I do negotiate and I decide company X's offer of $Y is plenty enough for me to be happy and then some, there is no reason for me to be unhappy if I find my coworker is making $Y + 10%. If I needed that 10% to be happy, I shouldn't have been happy with $Y.
Now, where such a thing is rational is if I'm not happy with $Y but I don't believe I can get a better offer so I take it and then later find out I probably could have gotten more. In this case, I'm already unhappy about $Y (although less unhappy than $0), so I continue to be unhappy when I find out I might have been worth $Y + 10% but am not receiving it.