Sometimes there is no answer. My husband left for his best friends wife. They had been best friends since 8th grade. And ours was the third marriage she broke up. So with them I think it was a matter of simply not having any real moral compass, which in hindsight I should have seen the clues of in other areas of my ex's life. I should never have married him.
However, I have a glaringly different example in my brother-in-law. He is very truly a brother to me. He is married to my identical twin. He has always been a fantastic husband except for a period of about a year. During that time he treated my sister like garbage. It was painful to watch. They went to counseling and he was like talking to a wall. My sister was ready to file for divorce. Then one day he simply said he could fix it. And he did.
A couple years went by and on their 25th anniversary he got a phone call. It turned out he had had an affair at that time, which he ultimately ended. The call was to tell him the OW had died. That's how my sister found out.
I am very protective of my sister. I was furious right along with her. And shocked. Nothing in the world would have made me think he was capable of that. In hind sight what made him end it was the thought of losing not just my sister but the extended family members. Losing the historic home they were restoring. And losing life as he knew it. He didn't want the collateral damage.
As to the whys of the affair? I have my guesses. It's easier for me to speculate because I wasn't the one betrayed and I saw their relationship more objectively. At that time my sister was miserable. She'd been through a particularly stressful event in her life. And then they moved to my small town into a huge old house that hadn't been lived in for over 20 years. She only knew me. And he stayed in the city all week for work and came home on weekends. When they did communicate all she did was complain because she was so unhappy. I think he when he got pursued by this woman who was really interested in him, the contrast was so great compared to what was going on at home, he got sucked into doing something he would never have considered doing.
I'm not saying this was my sister's fault, and I don't excuse what he did. But I can understand where he was mentally at that time and at least somewhat come to an understanding of how this could happen.
They are still married and doing better than ever before in their marriage. It was a wake up call to both of them. And I honestly don't think for a minute he'd ever do that again. He is completely transparent with her and she is way more involved in their finances and other things that she used to leave all to him.
In comparing his infidelity to my ex's they were really like night and day. Not all affairs fit into the same box. So I guess I don't really think once a cheater always a cheater. I've seen a good outcome.