Peter and the people at the time Jesus came were in dark times, and an external state; the people had lost the internal connection to religion, and were in an external outlook on life, ‘doing it to each other’. We see Jesus’ teaching addressing this situation in the Gospels.
The challenge for Jesus was to teach the people how to reflect inwardly and fight for inwardly meaningful relationships. Peter was very bold and compulsive and a good leader, but it was very hard for him and the others to change. When Jesus taught the disciples that he must go to Jerusalem and that he would be killed, Jesus told Him that He was not thinking as God does and said, ‘Satan get behind me!’ The bottom line struggle for Him and the others was that they accepted Jesus as the son of God and the Messiah, but they could not yet see that He was God himself. This is why Peter and the disciples could not heal the severe case of possession, and Jesus had to do it.
Peter’s denial of Jesus three times, was a severe and painful lesson of what was still in him from evil. It was part of the process of cleansing him of these ingrained inclinations to evil. Remember though, at the end of the Gospels, the resurrected Jesus tells Peter three times, “Peter, feed my sheep”; this is the restoration of Peter from His denial, that he can now be a trusted servant in the Lord’s house and lead the others.
Jesus said, “Do not think that I came to bring peace on earth. I did not come to bring peace but a sword. For I have come to ‘set a man against his father, a daughter against her mother”. Jesus had to lead Peter and the people from their external conditioning into the true internal understanding and love of the Lord. Peter’s boldness led him to make a lot of mistakes but it also led him to deep growth. It was not until the Pentecost that Peter and the disciples finally became whole, and completely dedicated servants, for then they received the Holy spirit and truly knew themselves, their mission, and the Lord.