What entered Yehudah's head? Does a Tzadik like him seek intimacy with a Zonah?
Seforno: Yehudah's actions were initiated by Hashem, who wanted Yehudah, who was more perfect than his son Shelah, to father Tamar's child, from whom Mashi'ach was destined to descend. 1
Hadar Zekenim (14): Because she covered her face, he did not recognize her. 2
Oznayim la'Torah (citing R. Moshe ha'Darshan): The Pasuk is speaking about Yehudah when he was going to celebrate the shearing of the sheep when it was customary to hold a big party 5 - and Yehudah was heavily drunk when he came across Tamar.
Gur Aryeh (18): He said "Havah Na" - prepare (you will be designated for me), and then there is no Isur. 6
Refer to 38:26:1:2. Rosh, Moshav Zekenim and Da'as Zekenim 15, citing Bereishis Rabah 84:9: Hashem sent an angel to arouse his desire and force him (refer to 38:16:151:1). Why did Hashem bring kings and Nevi'im in such a lowly way? We appoint a leader only if his past is shady. Had Yehudah produced kings honorably, he would have become haughty over the other Shevatim!
Hadar Zekenim says that this answers the question, but it is not clear how. Perhaps words are missing, and he asked why he paid to do Yibum, as if it was Bi'ah with a harlot. (PF)
Kidushin does not take effect through a security! We can say that he gave her additional money for Kidushin. Da'as Zekenim, Hadar Zekenim - this does not help (for she intends for the security)! Rather, he was Makneh the security to her, and later stipulated that she send the security in exchange for a goat. Riva - or, he was Mekadesh through a document or Bi'ah. Kidushin does not take effect on a daughter-in-law! Refer to 38:14:2:6*. Da'as Zekenim (26) - before Matan Torah Kidushin took effect on Arayos, e.g. two sisters or one's aunt (Yocheved).
Witnesses must recognize the parties involved. If they recognized her, Yehudah could have given the goat, like he promised! Perhaps she showed them an extraordinary Siman that Yehudah did not notice, e.g. an extra joint in her pinky. PF)
Footnote 87: This is like the Ra'avad (Hilchos Ishus 1:4); she is a Pilegesh. (In what sense what she designated for him? He did not recognize her. After the Bi'ah, he went away, and sought her only to redeem the securities from her! - PF)
Why did Tamar ask Yehudah for a token?
Seforno: Initially, she began talking to him, in the hope that he would recognize her and respond to her request. 1 When she saw that this was not to be, she asked for a sign that would ultimately force him to admit that it was with him that she had been intimate, as transpired later. 2
Why does it say "va'Yet"?
Bereishis Rabah (84:9): Hashem sent an angel to arouse his desire and force him. It says here "va'Yet", like it says "va'Tet" about Bil'am's donkey (Bamidbar 22:23; an angel made it veer).
Ha'Emek Davar: Yehudah went away from Chirah.
We already know that he did not know that it is Tamar! Why does the Torah repeat this?
Ha'Emek Davar: Even after he spoke with her, he did not know [from her voice].