Why did John Proctor disclose his affair with Abigail?
I assume that you are talking about the time that John Proctor admits his affair in public (in Act III) and not whenever he admitted it to his wife (not actually seen in the play).
If that is what you are asking about, he is going to disclose it mainly to get his wife and others out of being accused of being witches. He wants the court to know why Abigail has been doing the things that she has done.
John's attempt to be honest backfires when his wife does not back him up -- she's trying to save his reputation but ends up hurting him instead.