Traditionally, kids have 'belong' to their mothers. There is supposed to be an unbreakable link between a mother and his child that starts during pregnancy, experience men don't get to have.
In the past, when parents weren't as involved in their kids lives as it is today and kids were allowed to run freely, It was been easier for men to leave their families and never look back. Courts got used to this and usually gave custody to mothers by default. Today, many men get the short stick on this, especially nowadays that parents are more involved in their kids' upbringing and fathers want to be part of their offspring's lives.
I've known men that are wonderful fathers having to fight hard for the basic right of being part of their kids lives, have known women hell bent on punishing the father for not doing what they want by bad mouthing the father or denying visitation. Some of these women have won in court, some men have done it too. It is always unfortunate when the kids get caught in between, they are always the ones suffering the consequences of their parents' actions.
As jj said, there are always 2 sides to each story and the truth usually lies somewhere in between.