This is probably the most common reason cheaters stay married. They don’t want to hurt their kids, or they’re afraid that they may lose custody in the divorce.
It’s very sad that most married couples don’t understand that, this way, they may only hurt their children even more. Their kids will have to listen to their fights, and this toxic environment may have very bad consequences for their mental health.