I think some people don't cheat, no matter what the temptation or provocation.
I think a lot of people imagine temptation or provocation to be a sexy person giving you the come on, while your relationship is healthy, happy and meeting your needs. That's pretty easy for most people to shrug off, I think, although of course there's a type that will always go for a bit of fun if they can.
But that's a very different kind of temptation and provocation to when your partner is neglectful, distant, uncaring, abusive, controlling or similar, and you feel unloved and unwanted. You might well imagine that they wouldn't care if you did cheat, since they don't seem to care about anything else you do and perhaps don't want to sleep with you themselves. Of course you should leave if you know you're irrevocably unhappy, but life and love just aren't that black and white.
I used to think only a "certain kind of person" cheated, but as I got older and saw the stereotype busted over and over again, I had to rethink. I also noticed that it could even happen with nice or good people, if they were in the kind of situation I describe above. Is it ideal? Of course not. Are all cheaters and betrayed spouses like that? Of course not!
I used to say I'd never cheat, and I never have. But I've never been stuck in misery. I love my husband dearly and I don't want anyone else. But if he changed and started treating me with disdain, disrespect, distance and so on...well, I cannot say with absolute 100% certainty that I would end my marriage, sell my home, move house and change our children's lives before I took any opportunity of comfort or solace from another person.