Mm.Ok, but all of that is dumb. I'm sure you would agree, that just wanting to be above someone else is a terrible mindset and an even worse analysis of reality.
I think it is theoretically better to not base one's satisfaction on extrinsic factors: my experience is that it breeds unhappiness. That's how I try to be, but I have to reflect on and work at it. I cannot deny that in practice extrinsic factors do affect my satisfaction: for instance, even though my pay is fine and meets my needs and wants, I have also thought at times I should be paid more because I earn less compared to other people with the same qualifications and experience. Envy? Injustice of feeling exploited? In ways these negative feelings can be useful, if they motivate self-improvement.
I think it's also potentially quite a primal motivation. Someone who has more than you is more powerful, and potentially, even subconsciously, appreciated as a threat, and we are deeply motivated to remove threat. Or social dynamics like pack dominance, that whilst we have a drive to co-operate, also a drive to dominate.
Of course we are also in a capitalist system which thrives on competition, which drives a sense of winners and losers, superiority and inferiority. The poor are often characterised as unworthy, with rhetoric to emphasise their vices, whilst the rich are lauded and characterised with rhetoric to emphasise their virtues. Thus our socioeconomic system, pushing competition, has at core a powerful drive for people to think of themselves relative to others.