Every individual case of infidelity will have its own root causes, to do with every player involved, and their relationships. However having an affair is always an active choice, it doesn't just happen. That choice is made by the people having the affair and no one else. My dh had an affair, and the thing that really helped me most was my counselor telling me I was not responsible for his choices, only my own. Which is a bit of a truism really, but it can be very easy to take on responsibility for other people's actions.
My dh is not a bastard, and I don't believe he would ever have thought that he was the sort of person who would have an affair. Many years down the line he tells me he finds it hard to understand why he had that affair (and why he chose the person he had the affair with). Did our relationship have difficulties, yes, but they were fairly normal difficulties, and given that we were both unhappy it is interesting (I think) that I never considered at any point becoming attached and/or sleeping with someone else. If problem = infidelity how come it is nearly always just one person in the relationship who makes that choice?
I don't believe that either my dh or his OW were wicked evil people, they were however during that period incredibly selfish, self absorbed and cruel. I totally get that affairs make people 'high' idea - when dh was actively involved with his OW he was very happy and clearly got a big buzz out of it (think teenage crush). I on the other hand have never been more miserable, and yet even though he had totally withdrawn and was a total bastard, never thought I know what I'll shagg the milkman...
Sometimes even good people do bad things, and although there are of course perceived triggers, fundamentally they are excuses, not causes.