Rabbeinu Tam seems to be the one who holds that a full, non-conditional, divorce was given before going out to war. Tosfos in Kesubos 9B explains that even so it was done in secret so that people would not marry them in the meantime and then they would be unable to marry again when they return.
וניחא לפירוש זה הא דאמרינן בפרק הזהב (ב"מ נט. ושם) נוח לו לאדם שיבעול ספק אשת איש ואל ילבין פני חבירו ברבים ומפיק ליה מהאי מעשה דבת שבע דספק אשת איש הואי דדלמא יחזור מן המלחמה ור"ת מפרש כותב גט כריתות לגמרי בלא שום תנאי ולפי' קשה אמאי קרי לה ספק אשת איש הא הואי גרושה גמורה ואר"ת דקרי לה ספק אשת איש לפי שהיו מגרשין בצינעא שלא יהא נודע ויקפצו עליהם בני אדם לקדשם ולפי' הקונטרס קשה קצת איך בא עליה למה לא היה ירא שמא יחזור:
Rabbeinu Tam has a different approach to the divorce that was written by King David’s soldiers. Rabbeinu Tam explains that when the Gemara says: he writes a divorce for his wife, it means unconditionally, without any stipulation. Eventually, those soldiers that did return would remarry their wives.
According to [Rabbeinu Tam’s] explanation we have the following difficulty: Why is [the wife] called a married woman whose status is dubious, she is absolutely divorced? There is no question about her status according to Rabbeinu Tam.
Says Rabbeinu Tam: That she is called a dubious married woman because they used to divorce secretly, so that it should not be known that they were divorced, for people would be anxious to marry them if they would have divorced publicly. Since it was not well-known that they were divorced, the Gemara refers to them as married women whose status is dubious.
So, if Dovid would have married her publicly, all of his soldiers would be reluctant to give a divorce in a future war, since it would become public knowledge and people would start marrying their wives and they would be unable to remarry after the war.