Some folks cheat on their wife or their husband to put one over on them, to win at some game of deception. They might get more sex, but they lose intimacy. You cannot feel close to someone you treat as your opponent. You cannot feel known by someone you must lie to. You cannot have a close relationship and one on the side.
Some folks cheat because they feel they deserve it. They continue to provide whatever they view as their spousal duties robotically, with no living, breathing relationship left. Then, perhaps because they have seen others do it before them, they take the lover they feel they deserve. Oddly, they seem surprised when neither partner is all that delighted to have access to only half of the man or woman they could be.
Some folks cheat because they want their marriage to survive. Ironic, no? Something huge is missing from their marriage during their spouse's illness, addiction, layoff, or pregnancy, and they figure if they can just get this from someone else, they can keep their marriage alive long enough for it to recover. Again, it does not work. When you add deception and divided loyalties to an illness, addiction, layoff, or pregnancy, ti makes recovery a lot more difficult.
Some unmarried folks join in, helping one spouse cheat on another. A few do it because they somehow expect a healthy marriage to emerge from such a compromised beginning. They feel certain the odds that apply overall do not apply to them. Others do it because they want what married people have without any of the risk of loss.
Unfortunately for them, tolerating the risk of loss is the only way to get what happily married people gain from their relationships, which is far more than sex or money. The other benefits include loyalty, protection, kindness, acts of service, the intimacy of being known and appreciated without any mask, synergy, shared goals larger than those you could tackle alone, shared memories, being part of two families instead of one, and opportunities for great personal growth.
To put these at risk by cheating on your spouse or to miss out on them by cheating with someone else's spouse? Pure stupidity. Happy people have good relationships.