Why does the Torah interrupt the Parshah of Yosef with that of Yehudah?
Rashi: Because, when they saw the pain that the sale of Yosef had caused Yakov, they blamed Yehudah for advising them to sell Yosef instead of returning him to their father, and demoted 1 him from his position of leader.
Hadar Zekenim and 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 and bury sons, and know the pain of [losing] children, Midah k'Neged Midah!' 2
Targum Yonasan: Yehudah moved away from his brothers because he lost all his money. 3
Moshav Zekenim: It is to put the sale, in which Yehudah told Yakov "Haker Na" (recognize), next to the episode with Tamar, who said these same words to Yehudah.
Rashi (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. 4 The latter saw through astrology that either she or her daughter (Asnas) would have children from Yosef. 5
Oznayim la'Torah (citing Bereishis Rabah 85:1): 'The brothers were involved with the sale of Yosef, Yakov was involved with his sackcloth and fasting, Yehudah was involved with finding a wife and Hakadosh-baruch-Hu was involved with creating the light of Mashi'ach 6 - the final redeemer, 7 before the first oppressor (Pharaoh) was even born.
Pesikta Zutresa: Refer to 38:3:1:4.
Oznayim la'Torah: And he left their company because it is painful to live with brothers who have demoted you.
Presumably, it was Divine retribution for suggesting that they sell Yosef and profit from this. (EC)
Seemingly, the Torah could have continued to discuss Yosef, and written the episode with Tamar right after that of Potifar's wife! (PF)
Rashi (41:7) 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 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. 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" (Nedarim 20b), and all the more so children of Zenus. Tamar's sons were great Tzadikim, a breach of 'spiritual nature' - so Mashi'ach will breach 'spiritual nature.' The elders blessed Bo'az that his house should be like Beis Peretz - totally unlike what one would expect from a Mo'avis.
Malbim: I.e. Mashi'ach ben David; the first redeemer is Mashi'ach ben Yosef. Malbim: 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.
Refer to 38:1:152:2*
QUESTIONS ON RASHI
Rashi writes that Yehudah was demoted. What is the reason?
Sotah, 13b: Anybody who performs a Mitzvah and someone else finishes it - he leaves it unfinished, is removed from office. And Yehudah saved Yosef from death, but did not return him to his father. 1
Refer to 38:1:1:1.
Malbim: He was punished for clinging to Chirah.
Rashi writes that Yehudah was demoted [and married] after the sale. How can it be that only 22 years later, Peretz descended with two sons? Peretz was conceived after Shelah matured, two or three years after Yehudah's second son matured!
Da'as Zekenim, Hadar Zekenim - for Yibum, nine years is maturity, for it is considered Bi'ah. Earlier generations could father from the age of seven. 1
Ibn Ezra: Yehudah married before the sale. The Torah is out of order. 2 Ha'Emek Davar - since Sanhedrin 69b proved from elsewhere that earlier generations could father from the age of eight, and did not prove so from here, it holds that Yehudah married before the sale. 3
Sanhedrin 69b proves that boys could father from the age of eight. Pnei Moshe (Yevamos 10:7) - according to the Yerushalmi, Chor or Uri fathered at the age of seven; if the text is like the Bavli, he was eight. Moshav Zekenim left this question difficult. He says that Yibum applies from nine years, but one cannot father until 13.
Ohr ha'Chayim: It would be proper to say that he descended, i.e. he went to the south - however, "me'Es Echav" proves that it refers to demotion.
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 Chor's father! (PF)