I definitely think that there is something in the ego thing with the kind of people who cheat - that is some deep underlying need for affirmation and "excitement" offered by somebody new, which is so strong that everything else - exclusive commitment to partner, reputation, career, and even children - can go out of the window. Often covered up at the time before it comes out and turns everything upside down.
And whilst I wouldn't deny that the male ego can be a desperately sensitive and vulnerable thing, I believe that men and women are more similar in this regard than we sometimes think - in terms of the type of men and women liable to cheat and those who never would.
A previous poster said that men can "compartmentalise" things, which is exactly the word my first long-term girlfriend said to me to describe herself when she tearfully admitted to me that she'd had a one-night stand with another guy in her first term at her uni. She told me that she still loved me, wanted to be with me, etc but also wanted the exciting life of "freedom" as a uni student.
She said that for some reason in her head she could switch from one to another. I did actually believe her, and at least she was being honest with me! I forgave her in the hope that this was a one off and somehow we carried on. Until it happened again, and again with other men. That finished it really and wrecked me for months. I thought this was the girl I was going to marry. I never had and would never have looked at anyone else.
Whilst I could say that this was just a lack of maturity on the part of a 20 year old I know people of that age who would never behave like that in their relationships and also people in their mid-forties - men and women - who do.
At 22 it was a learning experience for me for sure. I'm glad it all happened now as I would never have met the the lovely woman who's been my wife for the past 25 years. But it hurt like nothing else at the time.