Affairs are no longer the preserve of Bad People. I know this because there's a book out called When Good People Have Affairs, by Mira Kirshenbaum. Just because you find something on the internet don't make it so, but when it arrives in actual print, you have to sit up and listen.
It's not so simple that you can just put the paper down, go out, shag someone from the corner shop and remain Good. I think you have to be acting under one of Kirshenbaum's 17 motivations, which are; breaking out into selfhood (my personal favourite); accidental; sexual panic; let's kill this relationship (and see if it comes back to life - her brackets); mid-marriage crisis; trading up (this is when you've "moved on" and your spouse hasn't. It really means "lost weight"); heating up your marriage; I just needed to indulge myself; ejector seat (this is exactly as it says on the tin - it helps to get you out of your marriage, much like techniques such as "doing a runner" and "getting a divorce"); see if; distraction; surrogate therapy; do I still have it?; having an experience I missed out on; revenge; midlife crisis; and, finally, unmet needs.
I think there's a certain amount of crossover between these motives, but I am not here to critique this remarkable addition to human knowledge. I am here to add to it yet further. There are even more Good People out there who have had affairs for none of these reasons - whose motives were even more contemporary. But that doesn't make them Bad.