No, it really doesn't.
Ghosting a friend is hurtful. Not illegal.
Going no contact with a family member - hurts someone else, not illegal.
Promising to leave someone something in a Will and the secretly changing it - harmful, but not illegal.
People don't belong to other people, no matter whether they are married or not. Nobody belongs to their spouse, nor even to their children.
Do your suggest a legal penalty / criminal action recourse for a spouse if the other partner leaves them simply because the relationship is over for them? Or because their spouse no longer wants to have sex and that's a deal-breaker? Or because the spouse refuses to work? Or one of the multitude of other reasons marriage might break down? Or is just in the case of adultery you think that a legal penalty is appropriate?
Sometimes people meet and fall in love with someone else. Sometimes, inadvisably, a relationship begins before the current one has ended. It's not great and nobody is saying it is. But it happens and nobody should be expected to completely sacrifice their own life and happiness to enable someone else to keep theirs. It's very difficult for children when their parents separate, particularly if this is badly managed by either or both parties where the children are concerned. But to expect a person, male or female, to remain in what has become an unhappy marriage, even if the reason is that one party has met someone else is essentially saying that the right to happiness of that person is of less value than the right to happiness of the other person in the marriage. And it isn't. Ideally, the person wanting to leave extricates themselves before beginning a proper relationship with someone else, but life isn't always tidy like that. Human beings are messy, every one of us.
Adultery isn't great. But it's not the worst transgression in the world.
And it never, ever gives anyone the right to share nude photographs of another person without their consent or to systematically harass innocent people.