In the process of time the daughter of Shua, Judah’s wife, died; and Judah was comforted, and went up to his sheepshearers at Timnah, he and his friend Hirah the Adullamite. Genesis 38:12 NKJV
For some, Genesis 38 is embarrassing to read. God includes this seemingly “unnecessary” interruption in the story of Joseph in His Word. It is there to show us that while God was overruling everything with Joseph, He was also working with Judah to discipline him—to teach him, to train him. It was Judah who had proposed selling Joseph as a slave (Gen. 37:27). He and his brothers had no concern for the heart of their father. They knew nothing of a fatherly heart. Years later, when Reuben said, “kill my two sons” (42:37), he still knew nothing about fatherly affection.
But while Reuben learned nothing, Judah had learned that he must acknowledge personal accountability, must care about his father’s heart, must himself have a fatherly heart (43:9). After this, God set him above his brothers: “Judah and his brothers” (44:14). What changed? How did he get to this point? It was through chapter 38.
Judah’s wife is dead and he goes to be with his friend. It is shearing time, party time. He goes with a woman disguised as a prostitute—his own daughter-in-law! She is like Jacob. She respects her divinely-given role to preserve the family line, but she goes about it by trickery. She becomes pregnant by Judah, unknown to him and yet the result of his sin.
When he learns that she is pregnant he is outraged. How dare she? She gives him proof of paternity. It was him! He confesses, “She has been more righteous than I” (38:26). She had done the right thing in the wrong way, but God used it to establish His purpose and to manifest His good pleasure: “The scepter shall not depart from Judah” (49:10). Perez is born—who is listed in Matthew 1:3 in the lineage of Christ!