I appreciate that happy people don't have affairs . . .
Actually, this is a myth. I believe it was either Janis Spring or the Harleys that did some pretty extensive research (using their own practice and experience with infidelity), and found that something like 20-25% of the affairs presented came from a marriage that both spouses characterized as healthy and even happy.
Never underestimate the power of just pure lust and excitement, coupled with some good old-fashioned poor boundaries.
But yeah, in the overwhelming majority of cases, the betrayed spouse has some work to do . . . often MAJOR work.