Oh I've known several people who were happy in their relationships who cheated. Happy with themselves as individuals? Maybe not so much, but in some cases this was more to do with their own inadequacies, failures and life disappointments and an inability to admit them- to themselves or their partners.
In others, it was simply about opportunity. As a pp has said, more a case of 'why not?' than 'why would I?' Especially vulnerable to that sort of thing were the quiet, self-effacing ones who had never had much luck attracting admirers, so when one turned up all hell broke loose at the sheer novelty of having a 'suitor'.
Of course, I've also known people use affairs to leave unhappy home situations, but that wasn't what you were asking about, was it?
The most important thing is not to think this was a lack in you, or your relationship with the man who's hurt you. I think it's hard to get to grips with how such a life-changing event can have such banal motives, but it's the truth.
A big hug to you OP. 