Commenting on 2 Sam 11:14
Technically, Bath-sheba could be
considered an unmarried woman, for, as the Talmud (Shabbos 56b) states,
David’s troops always gave their wives conditional divorces, lest a soldier be
missing in action, leaving his wife unable to remarry. (The Artscroll
English Tanach, Stone Edition: The Jewish Bible with Insights from Classical
Rabbinic Thought [New York: Artscroll Mesorah Publications, Ltd., 2011],
473)
Here is the text from the Talmud referenced above:
Shabbat 56a:
אָמַר רַב: רַבִּי
דְּאָתֵי מִדָּוִד מְהַפֵּךְ וְדָרֵישׁ בִּזְכוּתֵיהּ דְּדָוִד. ״מַדּוּעַ
בָּזִיתָ אֶת דְּבַר ה׳ לַעֲשׂוֹת הָרַע״ — רַבִּי אוֹמֵר: מְשׁוּנָּה רָעָה זוֹ
מִכׇּל רָעוֹת שֶׁבַּתּוֹרָה, שֶׁכָּל רָעוֹת שֶׁבַּתּוֹרָה כְּתִיב בְּהוּ
״וַיַּעַשׂ״, וְכָאן כְּתִיב ״לַעֲשׂוֹת״ — שֶׁבִּיקֵּשׁ לַעֲשׂוֹת וְלֹא עָשָׂה.
Rav said: Rabbi Yehuda
HaNasi, who descends from the house of David, seeks to teach the
verse in favor of David. With regard to that which is written: “Why
have you despised the commandment of the Lord to do evil,” Rabbi Yehuda
HaNasi said: This evil mentioned with regard to David is different
from all other evils in the Torah; as with regard to all other evils
in the Torah, it is written: And he did evil, and here it is written: To
do evil. This unique phrase indicates that David sought to do evil but
did not actually do so. His intentions were improper; however, his
actions were proper.
״אֵת אוּרִיָּה
הַחִתִּי הִכִּיתָ בַחֶרֶב״ — שֶׁהָיָה לְךָ לְדוּנוֹ בְּסַנְהֶדְרִין וְלֹא
דַּנְתָּ. ״וְאֶת אִשְׁתּוֹ לָקַחְתָּ לְּךָ לְאִשָּׁה״ — לִיקּוּחִין יֵשׁ לְךָ
בָּהּ.
That which is written: “Uriah
the Hittite you have smitten with the sword,” means that you could have
judged him before the Sanhedrin as one guilty of treason against the
throne, and you did not judge him in that manner. Instead, you had him
executed in a manner that deviated from the generally accepted principles of
judgment. With regard to that which is written: “And his wife you have taken
to be your wife”; it means that you have rights of marriage with
her, as by law Bathsheba was already divorced from Uriah.
דְּאָמַר רַבִּי
שְׁמוּאֵל בַּר נַחְמָנִי אָמַר רַבִּי יוֹנָתָן: כׇּל הַיּוֹצֵא לְמִלְחֶמֶת
בֵּית דָּוִד, כּוֹתֵב גֵּט כְּרִיתוּת לְאִשְׁתּוֹ. שֶׁנֶּאֱמַר: ״וְאֵת עֲשֶׂרֶת
חֲרִיצֵי הֶחָלָב הָאֵלֶּה תָּבִיא לְשַׂר הָאָלֶף וְאֶת אַחֶיךָ תִּפְקֹד
לְשָׁלוֹם וְאֶת עֲרֻבָּתָם תִּקָּח״.
As Rabbi Shmuel bar Naḥmani
said that Rabbi Yonatan said: Anyone who goes to a war waged by the
royal house of David writes a conditional bill of divorce to his
wife. That was done to prevent a situation in which the soldier’s wife
would be unable to remarry because the soldier did not return from battle and
there were no witnesses to his fate. The conditional bill of divorce accorded
her the status of a divorcee and freed her to remarry. As it is stated: “And
carry these ten cheeses to the captain of their thousand, and to your brothers
bring greetings and take their pledge [arubatam]” (I Samuel 17:18).
מַאי ״עֲרֻבָּתָם״?
— תָּנֵי רַב יוֹסֵף: דְּבָרִים הַמְעוֹרָבִים בֵּינוֹ לְבֵינָהּ.
What is the meaning of arubatam?
Rav Yosef taught: It refers to matters that are shared [hame’oravim]
between him, the husband, and her, the wife, i.e., marriage. The
verse should be read: Take the bill of divorce that determines the status of
the relationship between husband and wife. As, apparently, it was customary for
men at war to send their wives a conditional divorce, since Uriah later died,
Bathsheba retroactively assumed divorced status from the time that he set out
to war. She was not forbidden to David. (source)