Sacramental marriage is a covenant, NOT a contract. The bride and the groom tell each other that they are each theirs, no matter what, for the rest of their lives. It's just like the covenant between Jesus and His Church; no matter what the people do, Jesus (God) is ALWAYS true to His people.
"With a contract, if one agreeing party does something in violation of the contract then it is considered broken. The whole contract becomes null and void. Basically the signers of a contract agree to hold up their ends as long as the other signatories hold up theirs too.
With a covenant, both parties agree to hold up their ends regardless of whether the other party keeps their part of the agreement. A violation of a covenant by one party doesn’t matter as far as the other party’s responsibility to continue to do what they agreed to do."