Cheating is defined as getting of a reward for ability or finding an easy way out of an unpleasant situation by dishonest means. In the sexual context cheating may be an extension from this definition. Sometimes couples have deeper problems they have been avoiding.
When you cheat, that action is the outlet for that lack of communication and problem solving. Instead of asking yourself why did he/she cheated on me? (a question that will get you nowhere) it will just create more anger and confusion to your relationship. Ask yourself: Am I happy and fulfilled in my relationship? What problems haven't we communicated to each other? If all energy is focused on the action of cheating, there can’t be an answer, because there is nothing to solve.
What can be solved is what's going on in our dynamics as a couple, to gain clarity on what we really want. So cheating can also be a blessing in disguise, telling you to go deep and clearly see how you are relating.