I am not sure if it's a biological mental illness or not. But I beleive it is a personality disorder. My mother-in-law has it and I know she grew up in a very abusive home, but I also know there was mental illness in the family.
I read it was how they were brought up. Say for instance they were an only child and were always spoilt and given a lot of attention to. Personality disorders are not biological. They are a way of thinking and acting that was brought on in their childhood, such as abuse, neglect, abandonment, etc. So they think differently, irrationally. If someone was brought up to think they are superior than everybody else, say for instance a parent who always gives in to a child, who holds them on a high pedestal, etc. that person will grow up believing and thinking that they are better than others and that all of the focus should be on themselves. It slowly becomes part of their personality, as they believe and think things are.