Sometimes there has been deception in the marriage, sometimes it is only after separation for what ever reason this happens.
In most cases, the former husband and wife have retained a good friendship and the children are on good terms with both and often with the parent's same sex partner.