The purpose for including the affair was to have character development in the story. Abigail was willing to do anything, including the attempt to try and kill Goody Proctor in order to obtain John. This also made the foundation of Abigail, Goody Proctor, and John and how they were all significant in story development. If the writer had left of the detail of the affair, we wouldn't know why Abigail was trying to get rid of Elizabeth unless we made blind assumptions.
One important revelation that Mr. Darcy makes in his letter to Elizabeth is how immoral Mr. Wickham is. In Mr. Darcy's letter to Elizabeth, there are two vital revelations which make Elizabeth stunned by it. The other revelation is about the relationship between Jane and Bingley. This situation based on Jane Austen's novel titled "Pride and Prejudice".