The story of the woman caught in adultery (John 7:53-8:11) is not included in some of the earliest manuscripts. It was included by Jerome in his translation of the NT and so was in place c.380, if not earlier. If this section was not originally part of John’s gospel, is it an authentic testimony about Jesus and why was it included?
Papias, writing in the early second century, may have included this story in his “Expositions of the Sayings of the Lord”. According to Eusebius, “he set forth another account about a woman who was falsely accused of many sins before the Lord” (frag 3.17 = Ecclesiatical History 3.39). Papias’ work has not survived so we don’t know if it was the same story as in John’s gospel, but it is certainly possible. What is significant is he intended to collect and write down the authentic testimonies about Jesus, which he had learnt directly from surviving eyewitnesses, like John and Aristion, and from those who knew the apostles. (frag 3.3). It is also recorded that Papias was a disciple of John. This gives us grounds to speculate that if the story of the woman caught in adultery was not originally included in John’s gospel, Papias may have learnt this story from one of those who knew Jesus (perhaps John himself). An individual story like this would be less likely to be preserved than those that were part of a gospel so it is possible that the early Christians sought to preserve what they believed to be an authentic testimony about Jesus by adding it to one of the gospels. If this testimony originally came from John himself then this would explain why John’s gospel was chosen.
This is, of course, just speculation but it is certainly plausible. Whatever the reason, it is likely that this testimony about Jesus was believed to be authentic by the early Christians and so, if not originally part of the gospel, it was included to preserve it.