Infidelity or extramarital affairs have been extensively studied over the past two decades.
Basically, when it comes to infidelity, two related explanations have been given.
The first explanation is probably the most well known: Spouses cheat because of problems in their relationship - something is missing, passion has faded, partners feel lonely, people find someone who treats them better or who appreciates them more than their current spouse, and so on.
Simply stated, people claim that they are not happy in their relationship so they look for love and affection elsewhere.
The second explanation is more detailed in nature. This explanation ignores the reasons that people "give" for cheating and looks deeper into our human nature.
The second explanation explores what it means to be human and asks, "why is being faithful to a spouse so difficult for many people to do?"
Probably the best way to think about these two explanations is to view them as two sides of the same coin.