Judges often rely on the testimony of people considered to be experts in their field in custody battles because of the judge's lack of familiarity on the subject.
Experts on child psychiatry or psychology or mental health are often asked to determine the ability of the family to do custody. They forward their observations, complete with conclusions and recommendations. Evaluations on the activities of parents, quality of home life, parenting skills, relationships to the child, child's viewpoint and preferences will be conducted.
Two possible consequences will result from this endeavor. First, the expert's recommendation will be accepted by all parties - judges, lawyers and parents. Second, everyone agrees to go to court to allow the judge to decide the case.