"He said to him the third time, 'Simon, son of Jonah, do you love Me?' Peter was grieved because He said to him the third time, 'do you love Me?'And he said to Him, 'Lord, You know all things; You know that I love You.'Jesus said to him, 'Feed My sheep.'" John 21.17
Why did Jesus ask Peter if he loved Him? From my understanding, he wanted to teach about pure and true love. Just as faith requires attitude, love also requires action. Those who think that pure love is a feeling are completely wrong. It is not. Just as and faith, it also requires sacrifices.