Judah’s first two sons died because of their wickedness, but the first one had been married, and not having children, the next son was to bring up children in his brother’s name, but the second son refused to do it, and he died for his sin. However, Judah’s third son was too young for marriage. So, Judah told his daughter-in-law to wait until the younger son grew up, but when he had grown up, Judah failed to give that younger son to Tamar, Judah’s daughter-in-law.
Therefore, Tamar started devising a plan to have a son, and she would do it by tricking her father-in-law,
And it was told Tamar, saying, “Look, your father-in-law is going up to Timnah to shear his sheep.” So she took off her widow’s garments, covered herself with a veil and wrapped herself, and sat in an open place which was on the way to Timnah; for she saw that Shelah was grown, and she was not given to him as a wife (Genesis 38.13–14).
She made herself look like a harlot and that attracted Judah, and he went in with her and lay with her. She was wrong, and he was wrong on more than one account, and he was sorry later.
If you make a promise, keep it.