People in leadership positions in the church have a much higher standard to uphold. No doubt, other congregants knew about this affair and he was doing the right thing by making a public confession AFTER he had already confessed to his wife and forsaken the other woman. Hopefully, he was not presuming he could just continue being the pastor. It was a PUBLIC sin and it needed PUBLIC confession in order to set an example before the assembly. Don’t know why God took his life - could have been any number of reasons. We can look at Ananias and Sapphira as told in Acts 5, who said they sold a parcel of land and gave all the money to the group when they were lying. God slew them, it was said, “You have not lied just to human beings but to God.” (v. 4).
Yes, he did fail his congregation and public confession of that was necessary.
I agree also that there was likely suspicion of or knowledge of the affair anyway.
I knew a couple once where the husband was fooling around on his wife and I found out before she knew because I saw his car parked at someone else’s house when he was supposed to be at a meeting of some kind, as his wife old me he was doing that night (or rather supposed to be doing).
There’s something people can sense when someone is on the move.