It's not necessarily that having an affair you get something from the other person that you're not getting from your partner, it's that you created a situation for yourself in which you're unexpressed and so maybe you feel another person allows you to express yourself.