I think it’s a variety of reasons, several at once.
Weak willed, selfish, don’t care about the other person, self-centred, unhappy, depressed, need attention, perhaps they do it for the thrill & they know they can get away with it, some people get off on having affairs, good at lying, feel they are entitled, more sex, etc
The thing I can’t get my head round is how cheaters can lie so brazenly. You’re looking at your partner in the eye everyday, living a lie, sneaking around like a teenager (cringe), basically living a 2nd life, isn’t it exhausting and stressful?
I don’t like this word, but I would immediately get ‘the ick’ and all respect would go flying out of the door.