In this case it’s not the sex that’s the issue but the betrayal of a commitment. You can have marital infidelity that doesn’t include intercourse and it’s still just as much a betrayal and leads to divorce etc.
But the sex is the thing that tempts people to break the commitment. Yeah, there’s the libertarian take where you say “just don’t take the opioids if you don’t want to deal with the consequences” but I thought we had learned that libertarianism doesn’t work. You can’t model humans as rational creatures. You can improve outcomes by limiting people’s ability to make bad choices.
Sure! Why not outlaw adultery then ? Let's even stone them to death!
Yes, adultery by married people should be criminal, and the victim spouse should be able to prosecute it.
Which can happen for a million reasons.
But adultery is a very common reason, and a preventable one.