When I first learned English in school (almost 40 years ago) I was told that very young babies were grammatically neuter. Now I never hear anyone using “it” for a baby.
Has English changed in the last decades, or was my teacher wrong?
I'm not quite sure how much credence to give his opinion considering that his expertise was in pain, misery, and shooting guns rather than linguistics and grammar, but he certainly had strong beliefs on the subject, and I wasn't going to try to convince him otherwise.
It's not a grammar rule, it's a social rule.