At one time, women who were well educated, intelligent, and professional still couldn’t get good jobs in professional fields, dominated by men. But being a teacher was one profession open for them, as men didn’t get involved much with children.
Also, women, being more maternal, were thought to be more natural around children than men are. Today, it is still thought of as a women’s profession because children tend to bond more with their mothers than their fathers, due to their nurturing nature.
Men who are especially creative or imaginative or nurturing do very well with children; men who are too businesslike or ‘manly’ don’t bond well with children.