@darklyovert,
Why do people have all sorts of personality disorders? Why stop the querying with that affliction? Why are some people autistic, as an example? There's certainly no simple clear answer.
Some theorize that in some cases there could be a predisposition - that it occurs in the early development after prolonged physical or mental abuse. The individual in same cases can't cope any longer facing such abuse . Consequently the disturbed psyche 'splits' and creates an alter ego or egos in order to cope.