In the final act, when John and Elizabeth are talking, she alludes to some possible issues that had prompted the affair. She says, "I have sins of my own to count. It needs a cold wife to prompt lechery", perhaps referring to the fact that she was a stern, unkind woman, who was not very loving to John. She admits that "I never knew how I should say my love. It were a cold house I kept." So, she was not very openly loving, and had a hard time expressing her love for John. This, in combination with the fact that she had been "a long time sick", might have driven John away from her into Abby's arms. It doesn't justify the act, but at least gives us a clue as to some of the reasons why it happened.
We can't leave out the Abby factor though. If nothing else, this play shows her fierce determination when getting something that she wants. She wants John so badly for herself that she shoves a needle into her own belly to set Elizabeth up. Who knows what sort of scheming she did in the actual household when she worked there, in order to tweak situations into her favor. All in all, the affair was highly unfortunate, and leads to some very disasterous situations.