Listen, I'm not a biologist. I can't say HOW it happens, but I can say that it does. Being intersex is having both male and female parts. (Example: a p**is, and ut***s.) With how it happens, all I can say is that biology can be strange sometimes. There's literally a condition that turns muscle into bone, and it is extremely painful.
So, if there are only 2 genders, and gender is based off reproductive parts, where to intersex people fall into?