Suppose we take seriously the idea that when a couple marries, an entity with moral standing—the married couple—comes into existence. Then there might be cases where an action is good for the spouses but bad for the married couple, and the fact that it is bad for the married couple could provide a strong moral reason to refrain from an action even if the action is good for the spouses.
That said, I don't accept an ontology on which a new entity comes into existence when a couple marries. But something similar to the above could still be the case. There are two kinds of wellbeing: one may call them narrow and extended wellbeing. Extended wellbeing is flourishing you have in virtue things outside of you going right for you. For instance, when someone you love has a success, your extended wellbeing increases even before you find out about it. Likewise, our reputation is a matter of our extended wellbeing, though it also tends to instrumentally affect our narrow wellbeing.
It can be quite rational to engage in some actions that sacrifice narrow wellbeing for extended wellbeing (just as sometimes the opposite makes sense). Now, even if a new entity doesn't come into existence when a couple marries, the members of the couple acquire a new mode of extended wellbeing, a mode where they are well insofar as the marriage goes well and poorly insofar as the marriage goes poorly.
But this means that it could happen that it would be rational for the spouses to sacrifice the narrow wellbeing of both persons for the sake of the external wellbeing they have in virtue of their marriage. It could well be that destroying the marriage is on balance a harm to the spouses even if they no longer care about the marriage and its destruction makes them feel better, just as an action that destroys one's reputation may be a harm to one even if one no longer cares about one's reputation and enjoys ruining it.