Cheating's a subject pretty close to my heart. My husband Charlie and our closest friend Juliet had an emotional and physical affair for about 6 months before I discovered it, and we began a very rough road toward poly.
I've come to think of what happened as the combination of three elements.
First, they fell in love. That can happen to anyone, and doesn't necessarily lead to cheating. It's a tough place to be, though, when you've already become deeply invested in your feelings for another person, and there is no existing route in your relationship construct to be able to express this... Except perhaps to leave one for the other. I actually have a lot of sympathy for this position, as it's the same one I was in when I fell for Charlie while still married to my first husband.
Second, neither of them was feeling particularly close to their primary partners during this period. Each of the couples was going through a lot of stress and communication issues. Charlie and Juliet turned to each other to vent, and it brought them closer. Of course, this was a self-fulfilling prophecy. The more they found it felt good to vent to each other, the less they actually worked on the issues with their respective primaries. The more rocky those relationships got, the more it felt like they were justified in seeking relief in the affair.
Third, they chose a path of selfish secrecy. This is the essential ingredient for cheating, in my view. The other pieces set the stage, and I do see how well-meaning people can get into those situations. In the end there is a choice, though. They chose to pursue their romantic feelings and sexual desires behind the backs of their existing partners.
The thing that I will maybe never understand is that cheating seems to be a unique kind of dishonesty - a kind that two otherwise radically honest people can practice without mindfulness. This is the mystery that haunts me even now, to be honest, and the reason that I'm not ultimately convinced that my husband won't cheat again, even though he has worked to embrace a much more open and mindful way of life.
I'm really grateful to the people who have cheated posting here, because it does help to hear your stories and perspectives. Being a very analytical person, it drives me crazy not being able to figure out how two people who claim with all their hearts to care deeply about me decided to create a lie so hurtful. I'm trying not to concentrate too hard on the question, because in the end whether I "get it" or not doesn't make much difference.
I think/hope that my two dear cheaters are a lot less likely to do it again in the future, having faced the giant emotional burdens that being found out created. But I also think that there is *something* in their psyches that allowed them to do it in the first place - something not everyone has. I don't think it's gone.