"Why" is a complicated answer that took me years to work through and understand, and it would take years to explain in any relatable detail. But I will try my best to nutshell it.
I grew up in a family that taught me that I have no intrinsic self-worth, and that my value as a person was measured by my ability to make others happy. I was loved when I told my controlling and narcissistic mother how wonderful she was. I was compared to my father, to my siblings, to others in the community, and always found lacking. My sadist brother used me to quell his need to hurt others, both physically and emotionally. He did a real number on me, and I learned that my sadness and pain made him happy, and when he wasn't happy, it got worse, so I learned to see my own suffering as good and appropriate. At school I was the brightest kid in class by far, however I was also the fattest kid, and the only Jewish kid, so I was teased, beat up, demeaned and embarrassed daily. When I was 6, I was repeatedly raped by a neighborhood boy, and when it came to light, I was called a liar and made to apologize to him. So I learned that my truth has no bearing on my value, again, my only value was in how I could please others so they'd stop hating me and hurting me. No one was going to protect me. No one was going to love me unconditionally. I was a commodity, nothing more.
I mention all this only to help you understand my why. I had no self-love, no dignity, no self-respect, no boundaries, and worst of all, I was 100% incapable of feeling good about myself unless there was someone else to fill that void, that need. When there wasn't someone else to provide value to me, it was as if my heart and soul turned into a black hole. I simply lacked the ability to feel good about myself, by myself, for myself. Without external validation and praise, I was meaningless, empty, and devoid of love and joy to the point where I was suicidal.
Shortly before the A, my wife had taken a new job that required her to move to another town. We didn't want to pull our daughter out of school (she only had one year left) and so she rented a place, and I stayed back with my daughter, and we did our best to make it work. I didn't know all this stuff about myself at the time of course, so when my wife moved away, instead of stepping up and taking charge of things, I instead crumbled. The lack of her love in my daily life was no longer there, and as a result, my mind twisted itself around like a pretzel trying to figure out how someone could possibly love me, when I felt so empty and unloved? (There was also complex PTSD and other factors involved, but that just muddies things more). In my head, she was no longer feeding me love and attention on a constant basis, so that meant that she hated me instead. Rather than reach out to her or leaning into her (because I never learned to do those kinds of healthy things) I instead resented her, and blamed her for not loving me the way I needed, and felt abandoned and alone. None of that was real or true of course, but my head wasn't capable of accepting that. To me, it was life as normal. Once again, I was unworthy of love.
So when the AP walked up to me at an event and started to tell me how interesting I was, and how talented I was, and then basically offered me a chance to be a KISA to her... I jumped all over it. Again, none of this was a conscious train of thought in my head, it just was. The AP spent every second making me feel special, and needed. And those were the magic emotions for me. I went on auto-pilot and did everything I could to please her, tell her what she wanted to hear and do what she wanted to do, because that's how I had been taught that "love" works.
In short, I filled a need for her, and she filled a need for me, and those two needs were so intensely fucked up and broken, but when you are that broken, you can't see it. You don't believe it. And you get pissed and defensive when someone tries to tell you otherwise, because that threatens the supply of attention that is needed in the first place.
It took years of therapy for me to even begin to understand all this, and even more time to learn how to build those feelings of dignity and self-respect that I had never developed in the first place. I had to learn how to see and hear and love myself first, before I could see, hear and love my wife. And that meant I could no longer use my wife as my own, personal "love battery". It is still a struggle, building new parts of myself that never existed, and doing so in the wake of the horror I caused. If there was ever anything to make a person feel shitty about themselves, it is being a cheater. And when you already feel shitty about yourself, and then dump that enormous load of guilt and shame on top of it... well, it's not good. Stick your head in the oven kind of not good.
What I learned from all of this is that most WS's share a similar history. That is to say, a person who has healthy boundaries, self-love and self-respect, dignity, authenticity, compassion, empathy... a person like that would never be a cheater because they have too much respect for themselves and their spouse to ever do such a thing. So it stands to reason that if you cheated, then you most certainly lack those qualities. That's my point of view anyway.
Attempting to correct this has involved:
1) Spending years digging into my own pain and history to truly understand who I really am, and why I did things I did.
2) Learning to build, for myself, those things which I was never taught. Learning to love myself.
3) Removing the roadblocks such as shame, remorse, grief, and depression. I was self-sabotaging constantly.
4) Figuring who I wanted to be, how to get there, and what needed to happen in order to make that a reality.
Honestly, there was no way to even begin any kind of meaningful or real R with my wife until I was capable of being an individual, with healthy boundaries and attitudes, and with a sense of self and of dignity. As long as I was broken, I couldn't build something healthy with another human being, not my wife, not my kids, not even myself. I had to learn to gain respect and appreciation for myself, and become the person I wanted to be, rather than crawling under a rock and feeling sorry for myself for all my past trauma. I had to beat the trauma, rather than the other way around.
I hope this helps to some degree.