Rabbis have taught that the command to wear Tefillin is contained in four passages Exodus 13:9, 13:16, and Deuteronomy 6:8-9, and 11:18-20, and these passages were placed in the Tefillin boxes. The passages do not mention Tefillin but say, quoting Exodus 13:9, “And it shall be for a sign unto thee upon thy hand, and a memorial between thine eyes.”
While the rabbis interpreted “upon thy hand” as a biblical command to don Tefillin on one’s arm (not hand), and “between thy eyes” as a biblical mandate to place Tefillin on one’s forehead (not between the eyes), the great Bible commentator Rashbam (born around 1085) understood the verse metaphorically. “According to its plain meaning, it (the Torah teaching) should be remembered always as if it had been written upon your hand, similar to ‘Set me as a seal upon thy heart and a seal upon thine arm’ (Song of Songs 8:6). ‘Between your eyes’, it should be like a piece of jewelry or gold chain that people put on the forehead for decoration” (Rashbam on Exodus 13:9).
I would suggest a small change from what Rashbam wrote. Yes, what we see here are two metaphors, but what the Torah is saying is “sign upon thy hand,” think of the Torah teaching whenever you use your hand, in whatever work you do. And “a memorial between thine eyes” means think about the Torah teaching whenever you see something and whenever you think of something.
Rashbam realized that the four verses that speak about the hand and between the eyes should not be taken literally. They are similar to the passage that Rashbam quoted and to “Hear, my son, the instruction of thy father, and forsake not the teaching of thy mother; for they shall be a chaplet of grace unto thy head and chains about thy neck” (Proverbs 1:8-9), and to “My son, keep the commandments of thy father, and forsake not the teaching of thy mother; bind them continually upon thy heart, tie them about thy neck” (Proverbs 6:20-21). The passages are not requiring Tefillin, but are encouraging the Israelites to remember the teaching of the Torah always, even when you do any work (upon thy hand) or think about something (between thy eyes).
When did the new interpretation begin?
Tzvi Adams alerted me to the interesting scholarly book “Tangled up in Text: Tefillin and the Ancient World.” In his book, Yehudah Cohn, notes that the earliest Tefillin that have been found are from Qumran, the site of the Essenes near the Dead Sea in Israel, which was destroyed around the time of the destruction of the second temple in 70 CE. Cohn also notes that these Tefillin are “remarkable for its diversity, and evidences significant differences with later rabbinic dicta,” showing that there was no set rule what the Tefillin at that time should contain. He also notes that the ancient documents of the time – the Letter of Aristeas and Philo – do not interpret the four so-called “Tefillin” passages to require donning Tefillin.
Cohn suggests that the Tefillin were first used sometime after Jews came in contact with Greeks who wore amulets. Amulets were widely used by superstitious Greeks to protect them from medical problems and demons, and to cure diseases. The Greek “widespread use of protective amulets would have led Jews toward an integration of Greek practice with their own paramount source of authority, namely the Torah…. One can readily imagine that Jews would have been as eager as gentiles to avail themselves of such useful objects.” But instead of pagan texts or those mentioning idols, the Jews would use verses from the Torah, such as the promise in Deuteronomy 11:21 of “long life.”
It is no surprise, therefore, that II Maccabees 12:34-40 speaks about Jewish soldiers killed during a battle because each wore a pagan and not a Jewish amulet.
In short, the verses that the rabbis use to prove a biblical mandate to wear Tefillin do not mention Tefillin, they speak about placing something on the hand and between the eyes while the rabbis required setting the Tefillin on the arm and forehead; the verses should be understood as metaphors; the earliest find of Tefillin are from near the start of the common era but may have existed earlier; Jews came into contact with Greeks after 322 BCE; the Greeks wore amulets; it is likely that the Jews also wanted the protection afforded by amulets but felt it proper to place Torah verses in the amulets; we know that Jews used amulets for centuries even during the period of the Maccabees and many Jews use them even today; thus it is possible that the practice of wearing Tefillin began as protective amulets which the rabbis elevated and spiritualized later by reinterpreting the use of the boxes in a non-superstitious manner and assigning biblical verses to support their innovation.
Is the command to place a Mezuzah on the door also post biblical?
We saw that Rashbam interpreted the phrase about the hand and between the eyes metaphorically. We also saw that when the rabbis established the law of Tefillin, they did not require that the Tefillin be placed on the hand and between the eyes, but on the arm and forehead. The law about the Mezuzah is similar. While the biblical wording is “write them upon the door-posts of thy house and upon thy gates,” they did not require a writing in these places but the insertion of a parchment into a box or cylinder and the placement to this object on the door-posts of houses. Since the law of Mezuzot immediately follows the metaphoric law of setting a sign on the hand and between the eyes and since the rabbinical law about Mezuzot, like the law of Tefillin, was not enacted precisely like what was written in the Torah, it is reasonable to assume that the statement about writing on the door-posts is also metaphoric.
Were Mezuzot originally protecting amulets as were Tefillin? Probably so. Jews recall that Moses told the Israelites to place blood on their doorposts to protect them from death when the first-born of Egypt were killed in the tenth plague. Moses probably saw this act as a sign of courage and a stimulation to continue to act with valor; for by placing blood on their door-post, the Israelites were openly and bravely declaring that they had sacrificed the lamb, the Egyptian god, to the Israelite God. Yet, despite this meritorious idea, it is likely that many Israelites saw the placement of blood on the door-posts as a magical act to protect them. This is not unusual. It is common human behavior. Many cultures have placed items at the entrance to their homes to guard them from demons. Many early Jews poured salt on the entrance threshold to their homes to assure their safety. Even today, many Jews wear Mezuzot around their neck, as Christians wear crosses, some to announce their religious preference, but others to defend them from harm, even as the cross was used to weaken vampires in the Dracula legends.
Misuse of Mezuzot
Unfortunately, many people identify religious practices and objects with superstition. They feel that objects and practices are holy and have a mystical aura and must be adored, and they feel good about doing it – it gives them a spiritual uplift. They act toward “holy objects” like a husband who worships his wife without helping her, not making her life easy and their lives meaningful.
One example is the widespread custom of kissing holy objects such as the Tzitzit, Tefillin, Mezuzot, and the Torah scroll. The rabbis criticized these well-meaning behaviors when they first began. They are not Jewish in origin and were most likely copied from Muslims and Christians. One should use these items as they were intended to be used rather than showing useless adoration by kissing them. For example, the Tzitzit, Tefillin, and Mezuzah should inspire the study of Torah, and Torah should be studied to acquire some true ideas and to improve oneself and society.
Even the codifier Joseph Caro (1488–1575), who had a mystical bend, criticized the custom of kissing Tzitzit during prayer. Ironically, Caro states that he fears that this practice of kissing Tzitzit might expand and lead to kissing the Tefillin and Mezuzot, which it did.
Why did the rabbis differ about the contents of the Mezuzah as late as the twelfth century?
Probably the answer is that some laws were never really settled or formally canonized until very late. For example, in early Talmudic times, Tefillin were either cylindrical or cubical, but later the cylindrical form became obsolete.
It seems likely that the command to wear Tefillin and place Mezuzot on door-posts is post-biblical and the command in Deuteronomy 6:4-9 and 11:13-21 should be understood as follows:
The verses begin with the command to love God with all your heart (the heart was understood in ancient times as the mind), soul (in the Bible this means the body), and might (all that you have). It goes on to give examples in more detail how and when to remember to love (think about) God. Ten examples are given. (1) God should be constantly on your heart (in your mind), (2) teach it to your children, (3) speak about it at home, (4) and when you leave your home, (5) when you lie down, (6) when you get up, (7) tie them as a sign on your hand (think about God in all your work, (8) and between your eyes (when you think of something and in looking at anything), (9) write them on your door posts (think about God whenever you enter or leave your house), and (10) and on your gates (whenever you enter or leave your city).
 The translations of all biblical passages are from The Holy Scriptures, JPS, 1960.
 In his Bet Yosef, Orach Chayim 24. He wrote that not kissing was also the opinion of the eighth-century Natronai Gaon and of the ninth-century Moses Gaon. The Gaonim (plural of Gaon) were Babylonian leaders of Jewry from around the late sixth century to 1038.
 Tzvi Adams pointed me to a good discussion on the subject in https://en.wikipedia.org/wiki/Tefillin#Manufacture_and_contents.