The ancient Sages decided that they were going to capture and imprison the Yetzer HaRa. So they ordered a complete fast of three day….whereupon he [the Yetzer] was surrendered to them. He came forth from the Holy of Holies like a fiery lion…. He [the Yetzer] said to them, “Realize that if you kill me, the world is finished.” They held him for three days, then they looked in the whole land of Israel and not an egg could be found. So they asked, “What shall we do now?”…So they put out his eyes and let him go; (Yoma 69b).
The yetzer hara is 13 years older than the yetzer hatov. While still in the mother's womb, the yetzer hara begins to develop in a person. If he begins to violate the Sabbath, nothing stops him. If he commits murder, nothing stops him. If he goes off to another sin, nothing stops him.
But 13 years later, the yetzer hatov is born. When he violates the Sabbath, it rebukes him, "Airhead [literally: "empty one"]! Don't you know it says 'Everyone who violates it will surely be put to death' (Exodus 31:14)?" If he is about to commit murder, it rebukes him, "Airhead! Don't you know it says 'Whoever sheds a man's blood, by man will his blood be shed' (Genesis 9:6)?" If he is about to engage in a sexual sin, it rebukes him, "Airhead! Don't you know it says 'Both the adulterer and the adulteress will surely be put to death' (Leviticus 20:10)?" (Avot d'Rabbi Natan 16).
R. Isaac Arama, the 15th-century Spanish philosopher and commentator, connected the changes around bar mitzvah to the well-known beginning of the Mishnaic tractate on Passover:
For the first 13 years of life, one rebels, but in the 14th year, the light of intelligence appears in him, and then he becomes bar mitzvah and subject to the punishment of a human court. Similarly, our sages, of blessed memory, hinted at this when they said, "On the evening of the 14th we search forhametz [leaven] by the light of a candle" (Mishnah Pesachim 1:1) (Sefer Akedat Yitzhak, 61).
For Arama, the philosopher, the change that signals maturation is intellectual development, and the candle is a symbol of the adolescent's greater ability to perceive the significant legal distinctions, which also makes him liable for punishment in court. The early 19th-century Hasidic leader, R. Abraham Joshua Heschel of Apta, Poland, restated Arama's insight in terms of the birth of the yetzer hatov:
On the night of the 14th we check for hametz with a candle, for in Nisan, renewal comes to the world. Israel becomes like a child whose yetzer hatov does not enter him until after 13 years. Similarly, we check for hametz after the 13th night by the light of a candle, on the model of a child who becomes bar mitzvah after 13 years. And then we must remove [literally destroy, l'va'er] all of the bad characteristics [of childhood] (Sefer Ohev Yisrael--Parashat Vayetze).