What caused john proctor to have an affair?

Because his wife had just gave labor and she wouldn't want to have sexual interference with John