Jesus said, "Anyone who loves me will obey my teaching."
If I love God I will obey him.
Maybe I don't love God. If I'm honest with myself I have to say I don't obey him--not perfectly. And if I don't obey him, I don't love him. Not only this, but because I like to think I'm better than what I am, I'm prone to be a hypocrite. (How many people say they love God but obviously don't? See 1 John 4:20)
But it's not all bad news. Even though I don't love him as I should, he still loves me. Nothing I can say or do will stop him loving me. And nothing you can say or do can stop God loving you.
Jesus commands are not meant to show us we fall short and therefore deserve punishment. They're meant to show us that we don't love God, and that he loves us anyway. See here.