How is child custody decided when getting a divorce?
According to this article Child Custody laws describe the responsibility of guardianship over a child. In cases of divorce where children are involved, a court must rule on a child custodial arrangement as one of the terms of the divorce. Divorcing parents are free to reach agreement on an acceptable custody arrangement, however, in the minority of cases where parents dispute some aspect of the custody arrangements, the court will examine the family, the child, and the qualities or misdemeanors of either parent, before delivering a legally binding judgment intended to put the well-being of the child first. It is usually far preferable to reach a settlement outside of court, putting less strain on affected children, and being cheaper for the parents to avoid litigation.