When they had finished breakfast, Jesus said to Simon Peter, “Simon son of John, do you love me more than these?” He said to him, “Yes, Lord; you know that I love you.” Jesus said to him, “Feed my lambs.” A second time he said to him, “Simon son of John, do you love me?” He said to him, “Yes, Lord; you know that I love you.” Jesus said to him, “Tend my sheep.” He said to him the third time, “Simon son of John, do you love me?” Peter felt hurt because he said to him the third time, “Do you love me?” And he said to him, “Lord, you know everything; you know that I love you.” Jesus said to him, “Feed my sheep.
St. John Chrysostom
This is why the calamities of the righteous are recorded for us in Scripture; so that the upright as well as sinners can profit tremendously...