People are regularly subject to all sorts of temptation. Some choose to give in to it because they have no moral compass. This takes place whether they are deprived of sex, love, and attention at home, or surrounded with all those things.
Some people cheat to gratify their egos. For some, no amount of love and admiration is enough. They think they can get away with it.
Some people get bored easily, and when the wife is no longer fresh meat, or if she is de-glamorized by wet diapers and screaming children, he seeks glamor and excitement of through some woman who has never touched a diaper (or can pretend she hasn’t). These men have unrealistic, immature ideas of what marriage is supposed to provide them with or what women should be like I’ve seen this one quite a bit—the guy thinks a woman with three preschoolers should always look gorgeous and be ready to screw at the drop of a hat, whether there are two kids with stomach flu in the house or not, and then they get all pouty if she doesn’t have mascara on and isn’t as enthusiastic about sex as she was before they had kids.
Some men (and women) are in genuinely miserable marriages but don’t want to leave because of the children, and they succumb to loneliness and/or horniness. This is rarely the case, however.