English: “When you go out to war” — Scripture is speaking of an optional war (milchemes reshus).
On the daf / in context: Sifrei (and the parallel in Sotah 44b) distinguishes milchemes reshus from milchemes mitzvah. In a commanded war against the seven nations one may not take captives at all (“lo sechayeh kol neshama”). The language “when you go out” therefore limits the captive-woman law to discretionary wars of territorial expansion.
Type of Learning
Derash on the verse (Sifrei) — limiting the scope of the law by the ordinary force of “ki seitzei” versus commanded conquest.
What Is Learned
The laws of the captive woman apply only in an optional war, not in a commanded war against the seven nations of Canaan.