There is evidence of jealousy behaviors in our closest cousins, the chimpanzees. You can imagine how much that feeling is amplified within humans.
My tech lead earns more money than me. This is absolutely acceptable to me because I am aware they are better at programming and they have more responsibilities than me.
If I found out a coworker at the same level as me was earning more than me I would be upset with that situation.