In Matthew's Gospel, this passage appears in a series of rapid-fire questions from the religious authorities who are grilling Jesus in the temple. The Pharisees maintained huge libraries of commentaries about the Torah and believed themselves to be experts in the law as it appeared on ink and paper. When they heard that Jesus had silenced the Sadducees, another religious literate group, they gathered together and had a lawyer among them ask Jesus a question designed to "test" him.
The test question, or "trick" question was: "Which commandment in the law is the greatest?"
Jesus answers with words that were familiar to every Jew, words that were recited every morning and evening as a prayer. The "Shema" was so important that pious Jews took the commandment to "bind them as a sign on your hand, fix them as an emblem on your forehead, and write them on the doorposts of your house and on your gates" literally. Little scrolls containing the words of were worn on the foreheads of pious Jews in leather boxes called phylacteries and attached to doorposts in little containers called mezuzahs. It was a command to be carried, worn and touched.
But even more than that, it was a command to be lived. In a sense, the words on the scroll were unnecessary because they were prayed and recited daily. The irony of the "test" is that those standing in front of Jesus in their phylacteries had the text in paper and ink and yet they did not realize that in their desire for religious correctness they were allowing it to disappear.
Indeed, Jesus tells the crowds to listen to the teaching of the Pharisees but not to do as they do "for they do not practice what they teach." Of all the commandments in their scrolls, Jesus says, this commandment is "the first and greatest" -- not just to be taught, but to be lived. Even if the words on the scrolls disappeared, this commandment remains permanent.
The second commandment is "like" the first: "You shall love your neighbor as yourself" . This commandment wasn't just to be worn on the forehead, but it was to be kept in the heart and obeyed through the hands. For Jesus, love of God naturally works its way outward in love for neighbor, and love for neighbor can be an expression of love for God. If you put these two commandments together, says Jesus, you will boil down all the words of "the law and the prophets." The words printed by the water-jet printer may disappear every 24 hours, but the words of Jesus will never disappear.