Having an affair to deal with an unsatisfying marriage is the major problem in the western country. that's why may be the number of divorce incereased...
divorce always can't be the solution when you have already chosen each other for life long... so think before taking any step.
There are several things you got wrong.
1. Having extra-marital sex is quite common in many non-Western cultures, from India to China to indigenous cultures. Some cultures accept the practice, and some just turn a blind eye. It is the West, particularly Protestant Christianity which is remarkably sexually repressed, that made extra-marital sex such a big deal.
2. Divorce is the opposite of having an affair. Once you get a divorce, it becomes impossible to have an affair. I chose divorce when my marriage fell apart. Then I started having sex with other women. I never had an affair.
3. Lifelong monogamy is pretty unrealistic for must human beings. It isn't natural for a human to have only one sexual partner. Most of us are naturally serially monogamous (having one sexual partner at a time, but then changing partners every so often).
It is religion that imposed lifelong monogamy on us. It is pretty clear that this has been a failure, practically speaking. Most humans aren't built that way.