For your self, though, if you are doing good only to feed your ego, the appetite of your ego is still the driving force, so your morality will be subject to the whims of your ego, which means that you're a fair-weather do-gooder - sure to do bad when your ego demands it.
It's surprisingly easy to pretend. From my experience, a lot of rich people are surprisingly bad at seeing the difference between fake and genuine... If everyone around you is fake, you get used to it and it becomes the norm. You don't notice what is normal.
The richer someone is, the nicer people will be toward them and the more easily they become offended when someone is not nice. Being offended is not the norm for rich people so it hurts more when it happens.
Cultivating relationships to one's own benefit is a form of self-interest. This is about self-interest, not antisocial behavior. You can have one without the other.
What happens to niceness? It gets chewed up and eaten. I am a very cooperative person but through my life I have realized niceness/loyalty come at a cost but are hard not to do. If you aren't self-interested in yourself, noone will be.