I don't agree that affairs are acts of anger - mostly they are acts of opportunity and selfishness. It feels good so why should they care how it affects anyone else?
AS for the question of "can we ever really know someone?" - well, that's a tough one. Sometimes the WAS is just out of their mind high on infatuation, and like an addict, they can't resist. This may also be more true of those who suffered from depression or who have a past history of addiction. We know that infatuation lights up the brain just like cocaine does.
Sometimes, though, we just missed the signs of our spouse's true self because of the rose colored glasses we were wearing. It took me a while after our separation to put all the pieces together and recognize that my ex's narcissism had always been there, had always been a factor in our relationship, and that, in fact, I probably didn't know the whole truth about how many times he had actually cheated. I loved him and he, like many narcissists, was charming and a facile liar.
It doesn't invalidate the good times we had - there were many - but I can see now that those good times really depended on me doing a lot of twisting like a pretzel to keep him happy. And the signs that he was not good at fidelity were there from the beginning of our relationship - I just convinced myself that it was a one time occurrence, and missed the signs in between that and his affair years later that were indicative of probable other hanky panky going on (Or at least some inappropriate behavior if not outright affairs).
I think the challenge for you (and for many of us) is to take the rose colored glasses off and identify the red flags that we ignored in our spouses, so that we don't make the same mistake again.
And give up the desire for vindication or remorse - karma will take care of them.