Depending upon the situation, mothers should get custody of children after a divorce. There is nothing like "mommy" and there are no substitutes. If either parent is abusive, then the other parent should win custody. Ideally, both father and mother share custody of children in equal measure. Unless the mother is completely derelict, she should get at least some physical custody of biological children.
I don't care what gender you are. If your are fit for the role as the better parent out of the two, you should get custody of the child. There have been cases (several) where the mother automatically gets the role of parent, even if they're not the best fit.
Being able to give birth to a child doesn't mean you automatically love that child. I still can't fathom why people look at the gender concerning this situation, and not the actions?
A mother may not be the best parent for a child if the parents are getting a divorce. If she doesn't have the ability to pay for all the child's needs, or perhaps has criminal convictions I would argue the father is the most fit parent. If neither parent is fit, then the child should be given to relatives willing to take it in.