All I can do is share from my experience, you know, everyones situation is personal and unique and people arent totally monolithic things that we can draw conclusions about from wholly removed experiences beyond our own.
It took me more than a decade to break down the misrepresentations enough to understand what went on to even feel the betrayal in earnest. And two years of digging on the affairs, lingering misdirection, and a considerable amount of self exploration to work through the destruction to see forest instead of trees.
Relatively recently, I came to understand my wifes affairs were a double life/ split self situation. It took a lot of time to get there because I was constantly being thrown off that trail because her stance on what it was and the body of what could be learned outside of her words had almost no syncopation. And the lions share of information and therapists assumptions were in the vein of "women spiritually leave their spouse, fall out of love, and go in their hearts to the Ap."
Which contrasted pretty strongly with my experience. She seemed happy, we had great sex, we worked well together, and conflict was generally manageable. On the surface, she seemed as engaged as ever, and her at home demeanor wasnt particularly different from before the cheating.
To me this was more disturbing, not less, because the plainness of ease to deceive and snuggle was pretty cruel and shocking. Especially as memories of awful run ins and experiences had a behind the scenes context I lacked for most of the time we had known each other!
So I have a good bit of experience with something akin to your struggle here. And unfortunately, my conclusions are pretty bleak and wont be particularly comforting.
You assume that what he did would be hard to do psychologically because you lack a frame of reference for how entitled someone who does this feels to it. They really feel like they should get to be able to have both their relationship with you and possess your view of them as an honorable, faithful, and loving partner who is all in, and reap the benefits of being the opposite. They feel less guilt about doing it than youd expect because they genuinely think they deserve to have it all, including your perception of their purity.
This inauthentic "pure self" that your incomplete view of their life gives them is Super valuable to that portion of their personality split. Its the part of them that does the right things. Its the part of them that makes them feel worthy. And the reason they believe they are loveable to you.
This guides the choice to compartmentalize. Then comes rationalization, which eases the process further. They dont want to hurt you, etc.
but obviously everything in truth is in service to self protection. Where they dont feel guilt, they do feel fear of discovery. Of losing the game. Of losing either or both sources of fulfillment. And that makes compartmentalization imperative. These factors come together to make doing this and maintaining it quite easy and the obvious choice to them.
In other words, For them its less a question of "how am I able to do this" and more a necessary fact of life to maintain.
I dont think theres much hope from the betrayed end of unwinding this, even by talking to and sharing with our spouses because feelings of entitlement die hard. Especially if they are ingrained and reinforced by years of choices that they dig themselves into. It requires a conscious desire we cannot authentically live to see by litigating it with them. Sitting around and wishing they would wont help either. Live for yourself instead. If you can find a way.