Why does the Torah interrupt the Parshah of Yosef with the story of Yehudah?
Rashi #1: Because, when the brothers saw the pain that the sale of Yosef had caused Yaakov, they blamed Yehudah for advising them to sell Yosef instead of returning him to their father. 1 They demoted 2 him from his position as leader.
Hadar Zekenim, Seforno: Hashem said to Yehudah, 'Until now, you did not know the pain of raising children, and you pained your father - now you will marry off and bury sons, and know the pain of [losing] children, Midah k'Neged Midah!'
Targum Yonasan: Yehudah moved away from his brothers because he lost all his money (as a punishment for having sold Yosef - Perush Yonasan).
Moshav Zekenim: It is to juxtapose the sale of Yosef, in which Yehudah told Yaakov "Haker Na" (recognize), next to the episode with Tamar, who said these same words to Yehudah in 38:25.
Rashi #2 (to 39:1, from Bereishis Rabah 85:2): It is to put the episode with Tamar next to the episode with Potifar's wife, since both of them intended l'Shem Shamayim. 3 The latter saw through astrology that either she or her daughter (Asenas) would have children from Yosef. 4
Oznayim la'Torah (citing Bereishis Rabah 85:1): 'The brothers were involved with the sale of Yosef, Yaakov was involved with his sackcloth and fasting, Yehudah was involved with finding a wife, but Ha'Kadosh-Baruch-Hu was involved with creating the light of Mashi'ach' 5 - the final redeemer, 6 before the first oppressor (Pharaoh) was even born.
Pesikta Zutresa: Refer to 38:3:1:4.
Rashi: Claiming that had he instructed them to return him to their father, they would have listened to him.
Oznayim la'Torah: And he left their company, because it is painful to live with brothers who have demoted you.
Seemingly, the Torah could have continued to discuss Yosef, and written the episode with Tamar right after that of Potifar's wife! (PF)
Rashi (to 40:1) calls her an accursed woman. She had noble intentions, but tried to fulfill them via sin, and lied to get Yosef punished for not sinning with her. (PF)
Harchev Davar: Why is the birth of Peretz considered the budding of Mashi'ach, more than that of Yehudah himself? Peretz was born through a breach of nature. It was recognized that from him will come royal seed; a king breaches to make a path for himself (also see Ha'amek Davar to 38:29). He was also a spiritual breach. Normally one cannot expect proper children born through Zenus. Even children of a Perutzah (our text - Chatzufah, i.e. she verbally demands intimacy) or a wife that one plans to divorce, are (Yechezkel 20:38) "ha'Mordim veha'Posh'im Bi" (see Nedarim 20b), and all the more so children of Zenus. Tamar's sons were great Tzadikim, a breach of 'spiritual nature' - so too Mashi'ach will breach 'spiritual nature.' The elders blessed Bo'az that his house should be like Beis Peretz (Rus 4:12) - totally unlike what one would expect from a Mo'avis.
Malbim: Mashi'ach ben David; the first redeemer is Mashi'ach ben Yosef. The sale of Yosef was the beginning of the first exile. All the exiles are an interconnected chain.
What does it mean that Yehudah "descended"?
Rashi: He was demoted from his position of leader.
Ibn Ezra (to 38:2): He travelled southwards. 1
Adulam (as well as Keziv and Timnah which are also mentioned in this Perek) are in the Shefelah (lowland or foothills) region 2 of [what would in the future become] the land of the tribe of Yehudah. Yehudah descended from his family in Chevron (on the mountain ridge), to dwell in the Shefelah (lowlands). (CS)
QUESTIONS ON RASHI
Rashi writes: "Why is this section inserted here?" But perhaps this Parshah is written here, simply because it follows the previous Parshah chronologically?
Gur Aryeh: Rashi learns that the we would nonetheless expect the Torah to conclude the story of Yosef first. The digression to the story of Yehudah invites interpretation.
Rashi writes that Yehudah was demoted. What is the reason?
Sotah 13b: Because although he saved Yosef from death, he did not return him to his father; 1 and anyone who leaves a Mitzvah unfinished - and someone else finishes it - is removed from office.
Refer to 38:1:1:1.
Malbim: He was punished for clinging to Chirah.
Refer also to 38:12:1.1.
Rashi writes that Yehudah was demoted [and married] after the sale. How can it be that only 22 years later, Peretz (Yehudah's fourth son) descended to Egypt with two sons of his own? Peretz was conceived only after Shelah matured, two or three years after Yehudah's second son matured!
Da'as Zekenim, Hadar Zekenim: "Ki Gadal Shelah" (38:14) means, not age thirteen, but majority for intimacy - which is at the age of nine, as the Mishnah states in Nidah 45a, in connection with Yibum. In Biblical times, a boy from the age of seven or eight 1 was capable of fathering children - as the Gemara proves in Sanhedrin 69b.
Ibn Ezra: Yehudah married prior to the sale of Yosef, and the Torah is not in chronological order. 2
So writes the Da'as Zekenim. The Hadar Zekenim, citing the same Gemara, says 'eight.' See also Pnei Moshe to Yerushalmi Yevamos, 10:7.
Ha'amek Davar: Since Sanhedrin 69b proved from elsewhere that earlier generations could father from the age of eight, rather than proving it from here, it must hold that Yehudah married before the sale. (Do not say that the Gemara preferred to bring a proof that cannot be rejected. Also its proof from Kalev can be rejected. Some say that Kalev ben Yefuneh was not Chur's father! (PF))