Ego rents are very much a part of modern economic theory. As are any range of cognitive biases (see behavioral economics), institutional frictions, spatial constraints, and on and on. It's a wide tent. Some say too wide.
But, and I see it all the time, people will in many cases, not only not work together for mutual gain, but will actually choose actions that harm their own material wellbeing, if they harm their close rivals more.
People care about their relative status, not absolute wealth.