This is so hard to navigate, I'm sorry you are having to go through it.
I don't think you will ever get one or two definitive 'whys'. An affair just allows the 'escape' mechanism an addict uses. Or someone who is stonewalling,etc. Its about him.
Starsky is right...center and control YOU.
So you focus on you and find out what you want, and be real and present about what is good and what isn't in your life and your relationship, and you focus on the growing what's good and changing up what isn't good.
And if you want to save your marriage (which is worthwhile for both of you even with the pain, because the next relationships hold no guarantees, and actually have less chance of success) you do the same...build on the good, do more of what works and less of what doesn't work.
On another note, and this is NOT a site about how to get divorced, But not exposing the affair, does not mean you can't tell your attorney.
In my personal life I was divorced many years ago, long before I came to this site for another relationship. There was a factor in my divorce the attorneys both knew, but I didn't want to broadcast, especially when it turned out my FIL was in the courtroom, I felt it would hurt him too much to hear it. I was able to have the attorneys keep it in the documents and the discussions that my FIL wasn't privy to.
Be creative. Trust yourself.
All the best to you
sg Love is PATIENT, love is KIND, LOVE never fails / DB since 2001