The child is not a person, under the law, until they are born.They prevent the divorce from being finalized till custody is established. This forces the issue of custody... as it SHOULD.
Also, it is well established that people change their minds about custody when they see the child, and hold it in their arms.
Nothing wrong with this law. It protects the interest of both parties and protects the childs best interest.