Well, it was posted in probability and not is some social science board. So I thought it was safe to assume a purely mathematical question. Not that I can answer it...
Yeah, I wrote that after staring at it for a few minutes, and giving up any pretense that I could model it with confidence.
Social and biological aspects. Assume there may be some genetic factor which makes it impossible(or even just less equal-odds) for a pair to produce a female, or male. If that's the case, men will on average have more brothers than women do.
Interestingly, these sort of things are much easier to model empirically the way you did (all you would need is a small tweak to the "haveAKid" condition in the while loop around line 35), whereas the math gets pretty complicated fast.