If a man’s wife goes aside
and trespasses against him,
lying with another man… 
There’s an entire tractate of the Talmud — “Sotah” — that deals with this issue, and the application of the grotesque consequences described in Torah.
Our sensibilities aside, as well as the moral issue of adultery itself and the designation of the wife as the one committing adultery (a husband was not held accountable for sleeping with another woman outside the marriage, especially if she was unmarried), the whole topic begs us to ask: Why did the woman commit adultery in the first place?
When I started receiving psychotherapy at age 17, I was quickly taught a basic principle: Don’t judge the act itself. Rather — look for the underlying emotions and conditions that cause(d) it and address them. There is no “right or wrong.”
It was around 11 years later that I began to learn Torah, and realized that therapy, ignoring the moral level of things, doesn’t necessarily provide standards of behavior that are supportive of a just, peaceful society. Still, a purely “moral,” judgemental approach ignores the fact that people might do “bad” things for very compelling emotional reasons.
Adultery is a perfect example.
A man or woman might commit adultery because they take the bonds of marriage less than seriously. In that case, they would need to review exactly what they’ve gotten themselves into, and what is now expected of them. They must then make a conscious choice as to whether they can agree to make efforts to conform to those expectations. At one time, there was even a best-seller entitled “Open Marriage” by Dr. George and Nena O’Neill. In it, they advocated sexual activity with partners outside the marriage under select circumstances. The phrase “open marriage” even came to have the exclusive meaning of a marriage in which outside partners were involved. Some few years later, Dr. and Mrs. O’Neill disavowed this, saying that “the later research” showed that marriages didn’t typically survive these episodes. 
More often, though, the adultery is because of something missing in either the marriage relationship or in the ability of one or both partners to sustain a healthy emotional relationship.
“Two people get married and have marital problems, instead of resolving those problems either by fixing the relationship or ending it, which by the way can be a valid resolution of a problem, a third party is brought into the relationship, and now you have a ‘triangle’.” 
Therapy also points out that there might even be real reasons why one chooses to be the “other man” or “other woman.”
“All three people in this triangular arrangement have their issues. Let’s do one at a time starting with the ‘other man.’ He is definitely looking for love in the wrong place and with the wrong person. His superficial belief that he wants someone else’s woman for the convenience is a lie he defensively tells himself. The reality is he’s looking for love like the rest of us and afraid of what he’ll find.
The ‘other man’ is probably afraid that he won’t be able to ‘handle’ a love relationship with a fully available woman. He thinks that loving someone else’s woman will save him from this fear of intimacy. It only brings this issue roaring to the surface.” 
I knew of a few marriages and relationships that broke up over the years, but it was really on the internet where I began seeing comments from people who had been abused in marriage — both men and women. When I heard some of what they described, I was forced to ask myself: How can we expect people to stay in such heart-wrenching situations for a lifetime?
Still, is such misery an excuse for adultery?
In the end, we must make mature, conscious choices, with understanding about what we are beginning.
At the same time, we must realize that even well after a marriage begins, problems can arise. At that point, we’re called on to choose the most compassionate way to deal with them. “Compassionate” here means understanding that there can be a long train of emotional steps that lead to any behavior, the logic of which is sometimes — if not often — unknown even to the person doing the action. We can empathize with the emotion, even without condoning the action.
Compassion is Torah, too.
 Bamidbar/Num. 5:12-13