While describing the experience of the developing embryo, Rabbi Samlai offers a homiletical discourse that includes a well-known Rabbinic tradition – that while in utero the baby is taught the entire Torah, but that at the moment of birth an angel comes and slaps it, causing it to forget all that he learned.
The obvious question that arises from this story is that the entire enterprise of teaching Torah in this manner appears to have no purpose, given that it is to be forgotten in any case. Many approaches are offered in response to this question.
According to the Tikkunei Zohar the purpose of this teaching is so that when the child learns Torah anew, he recalls the learning that took place before he was born, which offers strength and vitality to the knowledge.
In his Pit’hei Nidda, Rav Betzalel Ranschberg suggests that because of the impurity manifest in humankind since the sin of Adam and Eve in the Garden of Eden, it would be impossible to learn Torah and retain its wisdom were it not first learned in the purity of the womb.
The Arukh LaNer connects this teaching with the one that follows it in the Gemara. The continuation of Rabbi Samlai’s discourse teaches that upon birth the child is made to take an oath – tehi tzaddik ve-al tehi rasha – “be righteous, and be never wicked; and even if all the world tells you, ‘you are righteous,’ consider yourself wicked.” In order for the child to understand the meaning of these terms and accept the oath properly, he must first study Torah.
In conclusion, Rabbi Samlai teaches that the following message is given to the soon-to-be-born child:
Always bear in mind that the Holy One, blessed be He, is pure, that his ministers are pure and that the soul which He gave you is pure; if you preserve it in purity, well and good, but if not, I will take it away from you.