"And it came to pass at that time, that Judah went down" (Genesis 38:1). [This teaches] that they excommunicated him. And they said to him: When you said to us, "What profit is it if we slay our brother" (Genesis 37:26), we listened to you; had you said to us, "Let us return him to his father," we would have listened to you. Therefore the [section] "And it came to pass at that time," etc., was placed next [to it], in order to place "Recognize, I pray" (there, 38:25) beside "Recognize, I pray" (Genesis 37:32). Another interpretation: Anyone who begins [a commandment] and does not complete it buries his wife and his sons. Whence do you [learn this]? From Judah, as it is said, "And Judah said unto his brethren," etc. (Genesis 37:26). He ought to have carried him upon his shoulders to his father, and he did not do so; therefore he buried his wife and his sons. "Unto a certain Adullamite, [whose name was Hirah]" (Genesis 38:1). This is Hiram who was in the days of Solomon and David, as it is said, "for Hiram was ever a lover [of David]" (I Kings 5:15). Hiram was accustomed to be a lover of the tribe of Judah.
Why Judah Went Down and Buried His Wife and Sons
Midrash Aggadah, Genesis 38:1
ויהי בעת ההיא וירד יהודה. שנידוהו ואמרו לו כשאמרת לנו מה בצע כי נהרוג את אחינו שמענו לך, אם היית אומר לנו השיבונו אצל אביו היינו שומעים לך, לכך נסמכה [פרשה] ויהי בעת ההיא וגו', כדי לסמוך הכר נא (שם לח כה) להכר נא: ד"א כל מי שהוא מתחיל [במצוה] ואינו גומרה קובר את אשתו ובניו, מנא לך מיהודה, שנאמר ויאמר יהודה אל אחיו [וגו'] (בראשית לז כו), היה לו להוליכו בכתיפיו אצל אביו, ולא עשה כך לפיכך קבר [את] אשתו ובניו: עד איש עדלמי [ושמו חירה]. זה חירם שבימי שלמה ודוד, שנאמר כי אוהב היה חירם (את דוד) [לדוד] כל הימים (מ"א ה טו), למוד חירם להיות אוהב שבט יהודה: