God never wastes an experience in our life, good or bad. When we sin, for example, God uses our failure as a ministry to help others struggling with the same sin. He allows us to share the times we fell flat on our face to encourage others who are doing the same. It seems that's what Jesus was teaching Peter.
In the upper room, during the last supper, Jesus told Peter He was praying for him. But His prayer was not to remove the temptation and inevitable fall from Peter. No, His prayer was that when Peter fell and suffered the consequences of that fall, that once he repented and returned to Jesus, he was to strengthen his brothers by that experience. Consider the following:
Luke 22:31-32 - And the Lord said, "Simon, Simon! Indeed, Satan has asked for you, that he may sift you as wheat. But I have prayed for you, that your faith should not fail; and when you have returned to Me, strengthen your brethren."
Jesus didn't tell Peter he would deliver him from the temptation, the sifting. He promised Peter that after he fell and recovered and returned to his faith, Jesus would use that experience to encourage and strengthen others who were struggling in the same way. That's why, in John 21, we see Jesus restoring Peter by saying, "Feed My lambs" (John 21:15). Even after Peter's epic denial of Jesus, his ministry was not finished. In fact, it was just beginning. And so it is with us.
Does this thought encourage you? It does me. If you want to learn more about your usefulness after your failure, then keep listening.
The following is a study on John 21:15-23.