I suppose in some cases the answer to the question is very easy, however in most custody cases perhaps not quite so fast and easy.
Obviously, the drug addicted, or incarcerated, or non-visiting parent, alienating, or mentally unstable parent is easily not the "better" parent. But what about the case in which both parents are involved with their children, both have responsible employment, both are self-supporting or financially stable, both are educated, and both are involved in the children's activities?
At that point the line between better and worse blurs substantially because probably both parents, but for the divorce, were or are good parents. Are they psychologically textbook perfect, of course not since few among us can claim to have all of the right stuff and be virtuous and always making the right decision and doing the right thing?
In a perfect world the parents would agree to equal parenting time so that the children can spend half their time with each parent and have the best of both worlds. Yet somehow, these two "good" parents can't get to that point and one parent or both believes that they are superior or that the children will fare substantially better spending more time with that parent.
Perhaps the decision is based upon school district, or work schedule, or child care options, or distance between the parent's homes, or other persons living in the home. Perhaps the decision is based upon finances, which parent will pay or receive child support. Perhaps the decision is based upon the age of the children and their preferences.
The result is that there is no one size fits all formula that addresses every nuance and shading of issues that arise in custody disputes. It is often quite difficult to predict the result when both parents appear to be good parents. I have heard some lawyers say that good parents would never put their children through a custody dispute although that too is an oversimplification of the problem. It is also well known that a custody trial will damage the relationship of the parents with each other and the children.
Testimony that comes out in the courtroom, accusations, second guessing decisions from years ago, aspersions on the other person's family can never be taken back and so the earth is scorched.
Therefore, think long and hard before you decide to go the distance in a custody dispute. Try to find a way to create a schedule that meets the needs of both parents and children. Be flexible with the schedule as it must be fluid to accommodate the needs of children who get older and parents whose lives will change as well.