It says in Genesis 38:13-18 NKJV
13 And it was told Tamar, saying, “Look, your father-in-law is going up to Timnah to shear his sheep.” 14 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. 15 When Judah saw her, he thought she was a harlot, because she had covered her face. 16 Then he turned to her by the way, and said, “Please let me come in to you”; for he did not know that she was his daughter-in-law.
So she said, “What will you give me, that you may come in to me?”
17 And he said, “I will send a young goat from the flock.”
So she said, “Will you give me a pledge till you send it?”
18 Then he said, “What pledge shall I give you?”
So she said, “Your signet and cord, and your staff that is in your hand.” Then he gave them to her, and went in to her, and she conceived by him.
For modern society this is pretty crazy. So, I'm curious: why did Tamar go to such lengths to sleep with her father-in-law? Why not another man? I also figure there was no guarantee that she would get pregnant, right? Additionally, she was acting the harlot in an open place so any man could have approached her not just Judah, or is my assumption wrong? Since Judah approached her as she planned it would make sense that she could have gone with a different man!