If your ego is a natural part of your soul then it has a purpose - yet in modern spirituality, it is rejected deeply. Some "kill" it because they think it is bad. Some think life is easier without it. Some just simply blame it for everything.
What I see a lot latly is that people confuse the shadow self - all of you that you reject and your subconcious - with the ego because of how the ego is being rejected, thus pushed "into the shadow", but it does not belong there.
But let's take a step back here. What IS the ego? The ego (or "me") is a product formed together by the shadow (or "it") and the higher self (or the "superego"), a little bit like a little angel and a little devil on each of your shoulders. It is the "you" that each of your parts percieve based on experience. Because the shadow and the superego are opposites, the result is a balanced ego. Unless, of course, I dunno… you get dropped into a world that constantly feeds the desires of your shadow while it doesn't give your higher self a true purpose. But usually this is a system that works, and that's why it is what it is.
Now, think about this: If the ego, so to speak, is the avatar of (the rest of) your soul and a reflection of the perspective you have on it, what do you think would happen if you, subconciously or on purpose, blame it for all that is wrong with the world. Well, then ego BECOMES all that is wrong in the world. Or to put it into different terms: A demon.
Ok, but so what, since we can actively observe and interact with our ego if we notice that we become like that we can still work on ourselves. The superego, of course, will try all it can to fix this mess. That is unless it does the one mistake that can make the fuckup perfect: Denying the existance of the ego.
Some people take "ego death" very literally at this point: They notice that something is wrong with them spiritually and seek help. One of the many people who preach "ego death" reaches them, they end up using some sort of ritual to "kill" their ego and boom, since they no longer have an ego all the problems are gone. Except they are not.
The pros at this point will want to point out "ego death is about accepting your ego, not rejecting it" but this has become something rare. When you look at discussions online, ego gets blamed for everything lately instead of accepted. And what happens when you reject your ego so much that it is as dead to you as your little brother is after he accidentally deleted your 50+ hours savestate on Pokemon Blue? It becomes part of the part of your soul that is literally "what you reject about yourself": The shadowself.
Usually the shadows job is actually pretty damn important as long as it is kept in balance. In a world where fulfilled desires are not the most normal thing in the world the shadow is what keeps your ass alive as your main desire becomes survival and not something like pussy or entertainment. But now, with the ego finding refuge in the shadow, they both team up against the superego and the balance is oh so utterly fucked.
Worst of all: Since the shadow is a subconcious being (usually), the superego doesn't even notice this. It believes itself surpreme ruler of the soul, it is just and fair and cannot be otherwise, as there is no evil left within the soul with the evil lord "Ego" banned from its kingdom. But meanwhile, shadow-self and the now called "shadow-Ego" control the soul unsupervised, literally "from the shadows". With the ego gone, it is impossible to be wrong - no more need to worry about yourself, no more doubts, you can be a dick all you like since it is literally impossible for you to be wrong, DAMN, not having an ego is awesome!
I guess this is the point where I should finally make a point and click on "New Reply". So my point shall be: Before your face your ego, face your shadow. And don't throw yourself away, fix yourself. One guy said "what should happen is that a wizard should gain control over the ego and shape it into something better", but you already are in control. The shadow and the higher self, together, are not just in control, they are the creators. In order to control the ego, you have to teach your other two parts to work together. Work on the parts of yourself you don't understand rather than putting labels on your ego.
This is a really big topic and one single post can't take care of it all, it is bound to be full of holes and mistakes that can be pointed out. So please don't treat this as the one and only truth - it is just the personal opinion of a random anon.