What is the significance of the fact that Yehudah was in Keziv when his wife gave birth to him (their third son)? Why did she call him Shelah?
Rashi: Because 'Keziv' has connotations of stopping (letting down), 1 and that is where she stopped having children. She called her son 'Shelah' which [also] means 'ceased.' 2
Targum Yonasan: She claimed that Yehudah had forgotten 3 her.
Ramban #1 (citing the Ibn Ezra): The Pasuk is merely informing us that all three sons were born in the same place. 4 She called their son Shelah, because of its similar meaning to the meaning of Keziv.
Moshav Zekenim, Da'as Zekenim and Hadar Zekenim: Because he was in Keziv, she named the baby. 5
Seforno: Her hope to see her husband when she gave birth was Nichzevah (made false, i.e. was not fulfilled), because he was in Keziv (and not with her). Had he been there, he would not have allowed her to give a derogatory name.
Malbim: It says that he was in Keziv, for now Yehudah removed her from her father's city, and converted her. Therefore, her third son received a favorable name (and was not a Rasha - PF).
Hadar Zekenim, Ramban: We find that Techazev and Tashleh (Melachim II 4:16, Melachim II 4:28) are synonymous (to deceive).
As if the Torah had written "when she bore them."
Moshav Zekenim asks why he could not name the baby where he was. Perhaps he did not hear about the birth until after the Bris! (PF)
Why didn't the Torah mention that she became pregnant with Shelah?
Moshav Zekenim: She became pregnant with Onan and Shelah together, 1 only there was a break between the births. 2
Moshav Zekenim: After Onan died, Yehudah told Tamar to wait until Shelah matures! Really, he was the same age, and this was a mere excuse for him not to marry her. (Perhaps even though he was old enough to do Yibum, Yehudah wanted to wait until he matures more, lest he repeat Onan's mistake. - PF)
Rosh: Rashi brings from Bereishis Rabah (85:4) "Paskas;" i.e. it was the end of her birth.
QUESTIONS ON RASHI
Rashi writes: "Keziv - ... So called because she ceased giving birth." Why was this so significant an event as to name the city after it?
Gur Aryeh: Bas-Shu'a had three sons in quick succession, and then suddenly stopped. This is indeed unusual.
Rashi writes: "Keziv (lit. disappointment) - ... So called because she ceased giving birth." How could they have known this immediately upon Shelah's birth?
Gur Aryeh #1: Perhaps the city was not named Keziv now, but rather at a later date.
Gur Aryeh #2: Perhaps the city was not named for the event, but the reverse - The city's name, Keziv, is what brought about the disappointment that she ceased to bear children.
Ha'amek Davar: Refer to 38:5:1.4:2.
Rashi writes: "... She ceased giving birth." What does this teach us?
Gur Aryeh: Bas-Shu'a quickly had the children she was destined to have, and then stopped. It was not the process of Teva that dictated the children born to the Shevatim; rather, the exact number and pace was from Hashem. 1
Gur Aryeh: Yaakov also fathered his own children in quick succession.
Rashi writes: "... In Bereishis Rabah (85:4), 'Shelah - i.e. she ceased.'" How could she know this when first naming him?
Gur Aryeh: Chazal are saying that the name is appropriate for him, for his mother ceased having children upon his birth. Of course, Bas-Shu'a did not know this yet, and this was not the reason that she named him Shelah.
Ha'amek Davar: The midwife recognized that she will not bear more children, because her womb was damaged.