Peter did that because he was acutely conscious that he had denied Christ three times just a few days earlier, after telling Jesus that he loved Him more than the other disciples did. We are ordered by God to love Him, our families and our neighbors. This is not a command to feel affection, or to like. We cannot command our feelings. Love others as God loves you.
Feelings are pleasureable.
It is nice to feel affectionate toward another person, and it is nice to feel that someone else feels affection toward you. But this has nothing to do with the love that God expects us to manifest in our lives. This is not a call to feeling, but a call to action. May the Lord help each of us to be determined to obey God, and to manifest the love of God in all our relationships.