That's where the term "Enlightened Self Interest" comes from.
Naive short-sighted stupid self interest is destructive - both to the community and even to the self interested individual.
But self-interest doesn't have to go away. We all have wants and needs, and most of our wants and needs are (mostly) harmless.
Instead, self interest can be enlightened - seasoned with understanding of the bigger picture, and with the wisdom of other's experiences.