This kind of thing happens in the real world, and it happens all the time. Every time it happens, it happens for a reason. There are a lot of reasons why people have affairs. In my opinion, people have affairs because they are bored in their current relationship, or because they have needs that are not being met within that relationship. In some cases, they are just thrill-seekers who become turned on by cheating on their partner.
Affairs begin with two people who find each other interesting and attractive.
For whatever reason, the relationship escalates into romance and, finally, into sexual intimacy. People who seek romance and sexual intimacy outside of their primary relationship feel that their relationship is missing something, so they go out and they seek it from someone else. An extramarital affair takes a great deal of energy. The lying, sneaking around, and destroying of evidence all take tremendous amounts of energy. The onset of guilty feelings about having the affair, in the first place, further zaps whatever energy the partner having the affair might still have left.