There are several statements in the Bible that link love for God (or Jesus) with doing what God (or Jesus) commands. First, in the midst of the Ten Commandments:
Do not make an idol in the likeness of anything that is in heaven above, in the earth below, or in the water. Do not bow down to such things or serve them, for I, the LORD your God, am a jealous God. I hold responsible the third and even the fourth generation of those who hate me for the evil of their ancestors. But I also show mercy to thousands of those who love me and keep my commandments. (Exodus 20:4-6)
How people respond to God becomes all-important here. Those faced with the choice to love or hate God are responsible for themselves, and they set a pattern of response to God likely to take hold of generations of descendants. God is “jealous”: he wants to be the only god his people love and honor. And it is by keeping his commandments that they show their love.
Much of the Old Testament is given over to seeing the results of incomplete “love” for God and therefore incomplete obedience of God’s commandments. Much of the Old Testament literature centers itself around the theme of exile, on the basis of the very real experience of exile, which, so that literature teaches, came upon the people of God because of that incomplete love and obedience. This is the opening line of a prayer of confession on behalf of the exiles by one of their number:
O Lord, you are the great and awesome God who keeps the covenant and sustaining love for those who love him and keep his commandments. (Daniel 9:4)
The point, as it goes on, is simply that the people have not shown that love.
From Jesus we have:
You are my friends if you do what I command you to do. I no longer call you servants because a servant does not know what his master is doing. I call you friends because I have let you in on everything I have heard from my Father. (John 15:14-15)
On a battlefield, the ordinary soldier is given commands, not options, and must rely on the knowledge possessed by others somewhere up the chain of command, not on his or her own understanding of the situation, which is purposely kept incomplete. Jesus’ disciples are not like soldiers. They know the whole story and how they fit into it because “the general,” the one who sees the big picture, loves them and keeps no secrets from them. They return that love to him by doing what he tells them to do. Those who do not do what he says to do show thereby that they do not love him, and perhaps also that they do not trust that he is smart enough: the “if” in that first sentence, “You are my friends if…,” is, in effect, an “only if”: “if you don’t do what I command you to do, you must not be my friends.” The word translated “friends” is connected with one of the Bible’s words normally translated “love”: these friends are those who love Jesus and show that they do.
Does it seem odd to us to hear of a love that is commanded and that is shown by keeping commandments? It might seem so if we have reserved our understanding of the word “love” for what can only exist in an equal relationship. It is clear that no such restriction on the concept existed for most or all of the biblical writers. This can be seen in a passage that can make us uncomfortable. If an indentured servant served out his term (or her term, as it turns out) and wanted then to stay with the master, he would become a permanent slave:
If he says to you, “I won’t leave you,” because he loves you and your family, since he has it good with you, then take an awl, bore through his ear into the door with it, and he shall be your slave forever. The same rule applies for female servants. (Deuteronomy 15:16-17)
Granted part of what is involved in this love is self-interest, especially when the only other option was starvation. And in another statement of the same rules (Exodus 21:2-6) the possibility that the servant might have to part from his spouse and children if he leaves is also mentioned.
Still, we see here love as a factor in the relationship between master and servant/slave. If the servant says to the master “I love you,” then the master says, quite logically, “step over here by the door so we can mark you as one who will, from now on, always do as I command you.”
So when Jesus the teacher begins an answer to a question from the back of the classroom by quoting Deuteronomy 6:5 —
You shall love the Lord your God with all your heart, soul, and mind
— and then comments,
this is the great and first commandment (Matthew 22:37-38),
his disciples are thus drawn into the same question raised for his ancestors in the Ten Commandments.
This is also the question that Jesus asks Peter after Peter has failed to love Jesus (in John 18:17, 25-27): “Do you love me?” Because Peter now answers “yes,” he will have a particular ministry of nourishing the other disciples, and he thus surrenders control over his own life and death (John 21:15-19).