I think being selfish is the cells of the human body protecting themselves from further damage not in an egoistical way as we perceive it but with an overall healing in mind. Only when the ability to protect increases it will lead to a different “attitude”.
Part of this protection is causing further damage but there is also being selfish without doing that and it may happen as a side-effect . I’m not sure but I sense it has a tragical touch. If you spin this further you see that healing cells need to learn to protect better by proper perception and patience. They also often get misidentified as hostile which is also tragical causing traumatization on the collective unconscious level.
The ego could be a protect mechanism on a deeper level.
edit: The question is whether it is healing of a sick body in a dramatical way or if it is just a natural changing process that goes its way anyway or maybe both and without the drama.