Many married people find solace in another's arms for many different reasons. Only she can answer your question. I feel the most common is a way to escape from the ordinary. The thrill, feeling alive, dopamine rush (which is addictive). Her head is stuffed far up her a$$ over it she's gonna deny/protect her addiction.
I know you are trying to get your head around this, it's very destressing especially when you have your family to think about....the future is so unknown. Everyone is right. You need to seek out legal counsel, and separate. Make sure you communicate well and reassuringly to your children. Work on fair shared custody. I feel horrible for you...your everything that you have ever known is gone. That's so heartbreaking. I wish you well, and hope for the future.