Peter was rebuking Jesus because he thought the things Jesus said must happen to Him (Jesus) must never happen, because Jesus is too good. He didn't have the concerns of God in mind but merely human concerns, like a lot of "Christians" today.
“You are a king, then!” said Pilate. Jesus answered, “You say that I am a king. In fact, the reason I was born and came into the world is to testify to the truth. Everyone on the side of truth listens to me.” - John 18:37