At a superficial glance, it may appear that Jesus is saying that we can earn His love by being obedient to Him. However, the message in these verses is not about earning but enjoying. ‘The Message’ makes this clearer I think:
”Make yourselves at home in my love. If you keep my commands, you’ll remain intimately at home in my love.”
We cannot earn the love of Jesus by being obedient to His commands; but by such obedience we will enjoy the fullness of His love. Those who walk in disobedience to Him, who trample on their own consciences, will feel a distance in their relationship with Jesus. He still loves them, but they will fail to feel the warm sunshine of His love tanning their souls. We can’t live how we please and enjoy all that Jesus has for us.
A particular command is emphasised here:
”This is my command: Love one another the way I loved you. This is the very best way to love. Put your life on the line for your friends…
…remember the root command: Love one another.”
So many other commands of Jesus are contained in this one. When you boil it all down, the Christian life is about loving God and loving people.