Family law defaults to the child's well-being, not to that of the parents. In other words, even if one or the other party lies about being able to conceive a child, they will still both be responsible for its care should one happen.

The principle is simple and sound: we don't punish an innocent child for the sins of a parent.