Good article Robert.
I agree with you that the vast majority of the time, custody is decided by the parents, not the courts. The jusge just signs off on what the parents agreed to during negotiation.
I have some thoughts about why the cases that go before a judge fall the way they do. I don't have statistics, but I have conversations with several lawyers and a few former judges from which to base my ideas off of.
First off, the courts are agents of the state and care about state interests as much or more than they do about disputes between individuals. Ultimately, the whole point of getting involved in personal disoutes is so that things don't devolve to the point where it affects our ability to live within a society.
The state and therefore the courts, as it's agent, has two functions. Keep the populace stable and money. Keeping those things in mind, we can speculate about how those goals play out in the case of child custody.
Children enduring turmoil tend to act out in various ways. Therefore, it's logical that to leave the child in the custody of the oatent who is already the primary caregiver at the time of the divorce is most likely to give the child the grestest chance of continuing stability.
Custody generally goes to the mother because I'd mother's are already the primary caregiver, that's what's best for the child. Also, since children are the future, that stability increases the likelihood that the child will grow up to be a productive member of society and not an unproductive element.
The second thing is that men are often unaware of everything that goes into taking care of a child. They show up to court unprepared, without having made arrangements, making space, etc. It's clear very quickly they have no idea what's involved because they haven't done it.
Men also tend to hold importance on status things always in greater or equal importance to people. But they're generally less likely to put people ahead, even if they think they're doing such and such for a person.
If you ask a mother if she's willing to give up her high paying job for one with hours that will allow her to be a present parent, more often that not she will not hesitate. She'll accept a lesser standard of living in order to mother. Men are less likely to make that decision, without pause. Statistically speaking, men are far more likely to abandon their families or their children than women are.* That means if the courts award custody to the father, the father is more likely to find himself overwhelmed and then more likely to either require CPS intervention (paid for by the state) or abandon the child ( which also costs the state money via follow up court cases or foster care).
*I will say that I believe this determination is much less true today than it has been historically, mostly because of the drug epidemic. I believe the court is behind the times and needs to reevaluate it's stance. But we all know the historical context is accurate. We've seen the reports, we've heard the stories, and we've lived it or watched our friends live it, if we're old enough.