Why did David send for Uriyah?
Rashi: He wanted him to be intimate with his wife, so he (Radak - people) would think that the baby is from him. 1
Perhaps Radak said that David was concerned for what people (e.g. neighbors) will think, for it is easier to deceive Uriyah about the time of birth, e.g. he will detain Uriyah from returning home until after the birth. (PF)
According to the opinion that Uriyah gave a Get on condition that he will not return, through sending him to his house, this will nullify the Get, and retroactively David sinned with a married woman!
Ran (Kesuvos 9b, citing R. Aharon): The condition was if he will not return with the rest of the nation. (Now he returned alone.)
Pnei Yehoshua (Gitin 74a DH v'Nir'eh l'R. Tam): In order to be with his wife, Uriyah would contest the condition of the Get. In such a case, Chachamim uprooted the entire Kidushin retroactively [according to some opinions]; this was already enacted in David's time.
Ru'ach Chayim (of the Chida, Drush 17 l'Shabbos Zachor): She will tell Uriyah that she is forbidden to him (due to her Zenus). He will not believe her. Mishnah Acharonah says that she is not believed (Nedarim 11:2). I.e. Chachamim uprooted her Kidushin retroactively [so even if she really had Zenus, it does not forbid her].
Malbim: If the matter would become known immediately, there would be Chilul Hashem and rebellion against David's kingship; we find that this happened to kings. 1 David thought that it is better to cover up the matter, and bear the sin of Eshes Ish. It was not feasible to cover up the time of birth, for her father's house and grandfather Achitofel would know! At the time of Bi'ah, he did not expect that she will become pregnant 2 . "La'asos ha'Ra b'Einai" (12:9) - you sought to do evil, but did not (Shabbos 56a), i.e. to cause Bitul of the Get.
Malbim citing Mahari: This is why Achitofel supported Avshalom's rebellion. If not, why would he do so? Surely he knew that kingship was promised to his great grandson Shlomo! Rather, he was irate that David took his granddaughter from her husband. (Yalkut Shimoni Shmuel II 151:16 says that he plotted that Avshalom kill David, and then he will execute Avshalom and become king himself! - PF)
QUESTIONS ON RASHI
Rashi writes that David wanted Uriyah to think that the baby is from him. This can lead to siblings marrying - "u'Mal'ah ha'Aretz Zimah" (Vayikra 19:29)!
Malbim: When the child would mature, David would reveal that the child is his son, and he would prevent him from marrying into his own family.
Rashi writes that David wanted Uriyah to think that the baby is from him. How long after David had Bi'ah with her was this?
Hagahah (on Ru'ach Chayim, p. 338 DH Hacha): We must say that it was within three months 1 of pregnancy. If not, the fetus is already recognized! Before this, even if she thinks that she is pregnant due to ceasing her menstrual cycle and other symptoms, a Safek remains. This is why the author (the Chida) said that David transgressed Havchanah by telling Uriyah to return. Even if Chazal had not yet decreed to wait three months to avoid a Safek about who is the father, in such a case one must be stringent!
It could be even after three months. Rashi (Bereishis 30:10) says that because Zilpah was very young, her pregnancy was not discernable. The same could apply to Bas Sheva, according to the opinion that she was six years old (Sanhedrin 69b)! (PF)