The Ba’al haTurim writes that the words of Moshe to Bnei Reuvain and Gad, “Ya’avor lachem kol chalutz,” hints to the gemara that all who went out to war with David wrote gittin to their wives to free them from the potential problem of yibum or chalitza (chalutz=chalitza) should they be lost in battle. Why is this hint mentioned in the context of addressing Bnei Reuvain and Gad in particular -- shouldn't the takanah of writing gitin to avoid yibum and chalitza apply equally to all soldiers?
R’ Yosef Shaul Nathanson explains that the writing of gitin was only done in milchemes reshus like those fought by David, wars for the sake of expanding the country. When it came to fighting a milchemes mitzvah, the takanah was not needed; Hashem promises that anyone engaged in a mitzvah will not come to harm, and there was no reason to weaken bitachon in that promise by having gitin written.
The majority of the shevatim fighting for the conquest of Eretz Yisrael were engaged in a milchemes mitzvah to conquer their promised territory. Bnei Reuvain and Gad, however, already had their portion of land. For them, the battles in Eretz Yisrael were a milchemes reshus, required only because of their promise to Moshe. Therefore, Moshe commanded to them, he’chaltzu lachem, in particular, not to rely on Hashem’s protection and to make sure they had gitin written.
(Side point: why is there no mitzvah to help conquer the land regardless of whether you take a portion somewhere else? Did geirim not have a mitzvah of kibosh ha’aretz just because they received no portion of land?)