The stone and the guard said "no entrance" but could not enforce "no exit". Peter might have thought that Jesus wouldn't wish to see him again but Jesus is so…
This is John's record of Jesus commisiioning his disciples. He gives them authority, his message and tells them that they need the power of the Holy Spirit.