MLCxH I don't believe most affairs arise out of anger, or any of the other things LH quoted. DIVORCES may arise out of those - because that's what healthy people do if they are unhappy in their marriage and don't think they can fix it - they get divorced. They don't cheat. But choosing to take your dissatisfaction (or anger, or whatever) and have an AFFAIR, and lie to your spouse's face (which LH did by omission for 14 years after he had an affair which he did not disclose to his wife until 14 years after it happened, depriving her of agency in her own life and her own decisions and likely poisoning the marriage in subtle ways long before she finally cheated on him) is a serious character defect at the very least. Sometimes (as in my ex's case) it's an indicator of a dark triad personality disorder as well.
I know many excellent people, here and elsewhere, who did nothing to deserve their spouses cheating except to be a little too trusting. Some cheaters plead to be taken back when their cheating is discovered, because they had no intention of leaving the marriage, they just wanted a little strange on the side.