What does Genesis 38:5 mean?
Jacob's son Judah (Genesis 29:25) moved to the region of Abdullam, away from his brothers and family at Hebron. His Canaanite wife has now given birth to three sons (Genesis 38:1–4). The first two are named Er and Onan. Both will meet an early death, dying separately as punishment for their sins (Genesis 38:7; 9–10).Judah's third son is named Shelah, which means something like "drawn out." When his third son is born, Judah is away but nearby, at a town called Chezib. These locations are only a few miles / kilometers apart.
While Judah does not yet realize it, his offspring will have an incredible legacy. Among his descendants are David, Solomon, and Jesus (Matthew 1:1–16). However, none of his three eldest sons will be part of that genealogy. Instead, his family line will be extended through a series of tragic and deceptive acts (Genesis 38:24–26).