God knows that our flawed humanity will cause us to fail Him. We will sin. We may even turn our back on God for a season. But he reminds us that there are great rewards for us in heaven. And, like Peter, God will restore us when we turn back to him..
Peter, who had denied Jesus three times - the third time with curses, was the apostle who spoke to the crowd on the day of Pentecost and led 3,000 people to salvation through faith in Jesus Christ. Peter had been restored to his true identity.