"The more specific the stimulus, the more predictable the reaction".
(Ivan Pavlov, Russian scientist, 1849-1936)
We're all familiar with Pavlov's famous experiments involving a dog, a bell, and a plate of meat, which led to the development of the theory now known as Classical Conditioning. The general idea is that if a particular stimulus (e.g., the ringing of a bell) is repeatedly followed by a reward (the plate of meat), a dog will instinctively "associate" the stimulus and the reward, to the extent that the stimulus alone will soon be enough to activate the dog's salivary and digestive fluids.
Over the years, Pavlov's methods have been, in various forms, tested on humans, with pretty much the same results. It's quite clear that our subconscious minds respond to external stimuli, and can form strong and lasting associations between things that are not always logically connected. Because those associations are automatic and immediate, they can become lodged in our minds and bodies long before our conscious brains have had a chance to think about whether it all makes sense.
It hit me the other day that Classical Conditioning can explain why someone would want to have--- or continue---an affair, especially when the lover is someone who by any rational standard is less worthy than the person's spouse.
Think of it in terms of associations. The lover or would-be lover is associated in the person's mind with nothing but pleasurable stimuli: smiles, kisses, gifts, attention, affection, passionate sex. This is particularly true when the lover is someone new, someone without perceived baggage, someone without obvious faults. To hear the lover's name is to feel something good spread through your body; to see his car parked at the restaurant is enough to get the heart pumping. There is nothing to complicate the conditioning or cause it to fail. Every cell in your body is desiring this person.
A spouse, by contrast, will often evoke mixed associations. Some of them will be strongly negative (the way you felt when he humiliated you in public). Some are mildly negative (the way he leaves the bathroom a mess), or neutral (he tries to communicate but he's predictable in what he says). And some will be positive, but maybe not consistently so (he used to love sex but he doesn't seem to care much anymore). They can't compete with the 100% positive associations evoked by the lover.
I'm not saying we're powerless to resist the force of pleasurable associations---unlike animals, we do have free will---but those associations are not going to go away even if we don't act on them. In fact, they may only intensify if we don't have an affair, or we break it off before we get to truly know the lover as a three-dimensional person. It's normal to idealize the lover who got away and resent the person who (unknowingly) caused us to abandon the chance for a perfect love.
The only lasting solution I can think of is to create and continually reinforce positive associations in your spouse's mind by changing your own behavior. Whether you're a man or a woman, you have to learn to think and act like a lover. You have to learn to smile more, touch more, kiss more, complain less. You have to listen more attentively, converse more interestingly, and do the little things that make your spouse's life more fun and less stressful.
And if your spouse is clearly making an effort to please you, you have to train your mind to divest itself of all the negative associations that have taken hold over the years. It's not easy, but start fresh. Try to look at your spouse the way you looked at him or her when you first started dating, when all associations were still positive. They can be again, but only if both of you care enough to overcome the negativity that has crept into your relationship and taken hold of your mind and emotions.