I am old and a realist and I've seen lots of marriages fail in my time. I would never say never about my DH or myself. I like to hope we wouldn't but I know it's naive to think like that.
DH and I discuss this often whenever we hear of another couple getting divorced or having problems. We both feel too terrified of everything we'd stand to lose, the hassle, the hurt caused to our children, the financial chaos and loss, the emotional and practical upheaval caused, and that's before we even consider how an affair on either side would impact on one another! Also neither of us has the stomach for being single again, the whole dating scene again and the time it takes to get properly comfortable with someone else, the thought of having to integrate someone new with our children etc, urgh it makes us shudder at the thought.
Having said that, relationships change, people change, people frequently grow poles apart - especially if they married young, mid life crises and things like depression, financial worries, bereavement, empty nest syndrome etc can all have an impact on people's relationships and their state of mind. And sometimes people who may feel that they have 'settled' just meet someone who tips their world upside down and they lose their mind over it and can't not have an affair. Although I strongly believe that many if not most people who have affairs are secretly hoping for it or looking for it and sending out signals that invite it.
For example my best friend who recently had an affair with someone she met in a bar on a 'girls night out'. One of many 'girls nights out' that she had recently started going on since she turned 50, lost her dad, had the mother of all mid life crises and started behaving like a teenager on heat again.
She, in spite of what she will tell you, was most definitely gagging for some male attention from someone who was not her DH and repeatedly put herself in situations where that was likely to happen so it was only a matter of time before an affair was the result. Yet she insists it 'just happened' and she never went looking for it.
For others it genuinely does take them by surprise and they weren't looking for it at all, but when that connection with the OW/OM became apparent they just failed to find the strength to resist it.
I also think lots of people tell themselves they can have a bit of fun/a fling, that they deserve it, and that they can walk away and no-one needs to know or get hurt. That often works out just fine except that once someone's got away with it once it's hard not to do it again and eventually you either fall in love or get caught.