Is it irrational and stupid? In a society at the limits of of its resources and stuck in a Malthusian trap, there is often zero-sum competition between members of the society.
Until the modern period and real technological growth, most humans lived in societies that were approaching local research constraints. Famine was common. If your neighbor had a bit more, it's likely because you had a bit less.
In that sort of a situation, learning that your peer makes twice as much as you thought is revealing quite a few things: e.g. you could have found a way to get paid much more and society is less equal or 'fair' than you thought.