Peter was the only one of the 12 disciples who experienced complete personal failure in following Jesus when things went outside of his understanding (Peter denying Jesus 3 times). Throughout Peter's time with Jesus, Peter went out of his way to prove himself a worthy disciple. He always had to show himself to be the most loyal, or the best at being a disciple in any way he could find. He seemed to always be in competition with the others. Peter had learned as a child that he had to conjure up and manipulate his way into acceptance by his own ability and strength. It is seen in his conversations with the disciples and even some of his conversation with Jesus. Peter relied on his self-dependence to navigate the 3 years he was a disciple of Jesus. Jesus confronted Peter a few times, but Peter didn't understand fully at the time what Jesus was trying to communicate to him.
When Jesus was arrested and condemned by the Jewish authorities, Peter's strength failed him. He gave into the social pressure around him and denied the Lord 3 times. When he heard the rooster crow and remembered what Jesus told him before, he collapsed and began to sob. He left the temple feeling like an utter complete failure. In his mind, he had failed at the most important assignment of his entire life. It wasn't until Jesus restored him after the resurrction that he gained any sense of confidence back. However, his new found confidence was no longer in himself, but in Jesus and His ability to hold him up. God had given him the understanding he needed to realize that it was not by his strength but by God's strength and power that will keep him from falling. Peter had to learn through his own personal failure in order for him to be fully convinced that his own strength was useless. Peter obtained a humility that couldn't be obtained any other way. Jesus being fully aware of Peter's destiny knew all that would happen, and knew Peter now fully depended on Him.
When the Holy Spirit arrived in the upper room on Pentacost, Peter was baptized with the fire of God and with power. When Peter walked around and people were being healed left and right because of his shadow, he didn't let it get to his head like he would have before. He knew with ansolute certainty that it had nothing to do with him, his strength, his righteousness, or anything else he could possibly bring to the table. He knew it was 100% Jesus and Jesus alone who did the mighty working of miracles in his life. It was for this reason that Peter was entrusted with greater signs and wonders then the other disciples. Peter spent a great deal of time in his letters 1 & 2 Peter talking about the importance of humility. It is because Peter knew first-hand by experience how important humility is for God to move through you.