Genesis 38:21
Then he asked the men of that place, saying, Where is the harlot, that was openly by the way side? And they said, There was no harlot in this place. Then he asked the men of that place, saying, Where is the harlot, that was openly by the way side? And they said, There was no harlot in this place.
Judah's friend asked the men of that place where the harlot who was openly by the wayside was, and they answered that there was no harlot in that place, so her presence and identity were not confirmed by the local men. Tamar had put herself out of her accustomed path and appearance so that Judah did not know her. She acted the part of a harlot with her father-in-law Judah. The harlot Judah thought he saw was a woman devoted to corrupt, idolatrous worship, in which unlawful sexual relations were performed as an act of religious devotion. The account belongs to the sin of Judah and of his family, coming after Joseph was sold into Egypt and before Joseph was bought by Potiphar, resisted temptation, was cast into prison, met Pharaoh's officers and interpreted their dreams there, and was brought out of prison to interpret Pharaoh's dreams thirteen years after being sold.
The account is one of the sad fruits of Jacob's mistake in having more than one wife, which led to low standards of morality and other harmful consequences. The account of Judah's sin is recorded to reveal sin so that people may shun it, not to pander to lust or excuse wrongdoing, and it also points to God's love, mercy, and power as the remedy. The episode is part of the recorded ancestry of Jesus, in that Pharez was born of the harlot Tamar and became an ancestor of Christ according to the flesh, through the human ancestry through which Christ came.
The deteriorated human line from which Christ sprang concentrated in Him all the weaknesses of humanity, so that the flesh He assumed had all the weaknesses and sinful tendencies to which fallen human nature is subject. This ancestry was not accidental but necessary so He could suffer death, be made like His brethren, suffer being tempted, and sympathize with and succor the tempted. Time, place, speech, or apparel, along with ignorance and forgetfulness, can obscure one creature from another and estrange human love and knowledge, but the Lord knows who are His and His eye is always over them, never obscured or darkened.