I'm certainly not defending the flawed abomination that (in some jurisdictions) has become America's domestic and family system. But, in the interest of fairness, the court does have a difficult mission - it must decide contentious issues while weighing the rights of mother, father and child - and hopefully, it will find accommodation that is ultimately in the best interest of the child.
In America, we have an adversarial legal system. I wouldn't have it any other way. Unfortunate, when two adversaries do battle, one usually loses. As long as due process is adhered to, that is really all that a civil society can ask for.
I hope you never experience all that "due process" can encompass when it comes to child protective services at your door. You might indeed wish you could have it any other way.