The grass is always greener on the other side!
I think in many cases for men and women it is biolgy related.
In general male animals mate with as many females as they can, trying to spread their superior genes. I think this is a big reason men are so danged horny.
For women in the animal world the females tend to rely on the males to provide for them. When the males stops providing or cannot provide her any more she starts looking for another mate.
This is a pretty stripped down idea from a biologist/ecologist, but I think on the basic level this could explain a lot of cheating.
There are lots of other reasons people can cheat. The excitement of begin caught. Drugs and alcohol.