I think it is worth quoting from a journal article on this subject. The article is "Violence and the Construction of Gender in the Hebrew Bible" by Harold Washington (Biblical Interpretation, 1997, pp. 346-349):
The male is by definition the subject of warfare's violence and the female its victim. For example, the language of the siege instructions of Deut. 20:10-20 is densely supplied with syntactical groups joining a masculine singular verbal subject with a city as (feminine) object of attack. The laws thus reinscribe the discursive positioning of the feminine as object of violence. Given a linguistic milieu where cities are so often portrayed in the figure of a woman — either mother (Isa. 66:8-13), queen (Isa. 62:3), or virgin daughter (Isa. 37:22), a woman married (Isa. 62:5), widowed (Isa. 47:8, 9; 54:4; Lam 1:1), or raped (Jer. 6:1-8; 13:22; Isa. 47:1-4; Nah. 3:5-6) — the concentration of feminine forms in Deut. 20:10-20 inescapably evokes the figuration of the city as an assaulted woman. In issuing the command to draw near to a city "in order to attack it," this text effectively enjoins the soldier "to attack her" (lhlchm `lyh, 20:10). The description of the submissive city "opening" to the warrior (wptchh lk, 20:11) evokes an image of male penetration. Similarly, the law uses the verb tpsh to describe the military seizure of a city (lhlchm `lyh ltpshh, 20:19), the same term used for the forcible seizure of a woman in sexual assault (wtpshh wshkb `mh, 22:28)....
The exemptions from combat in Deut. 20:5-8 disclose the motive for constraint of violence in the war code. The majority of commentators, who emphasize in their readings the humaneness of these provisions, identify with the warriors envisioned by the laws. How else could they characterize texts that authorize the annihilation or enslavement of entire populations as "humanitarian"? 92 The law exempts from combat a man who might shrink from the fighting lest he compromise the military effectiveness of his fellows (20:8). In the remaining cases, exemption from combat is grounded in the anxiety that "another man" ('ysh 'chr) might enjoy the newly acquired house, vineyard, or wife of a soldier who dies in war (20:5-7; cf. 24:5, 28.30). Here are envisioned soldiers setting out to deprive another people of their homes, their property, and their lives. Death in battle is regrettable, but presumably an honorable fate. Intolerable, however, is the prospect of dying in combat and leaving behind a wife or property over which the soldier never asserted his possession. The fundamental priorities of the law are demonstrated in the release from combat of the man who has just taken possession of a wife, "lest he die in the battle and another man take her" (20:7). This is the misfortune that a male code of war cannot allow.
Deuteronomic law assumes, however, that the victorious Hebrew warriors will seize the women of their vanquished enemies. The law of the war-captive woman (Deut. 21:10-14) sanctions the process. There is reason to doubt also of this law whether it was extensively applied. 93 Warfare for the purpose of seizing women, however, does appear in biblical narrative (Judg. 21:8-12), and in Ugaritic epic (KTU 1.14-16), where the hero Kirta stages a military expedition to capture a woman from a neighboring city. Rape has accompanied warfare in virtually every known historical era. 94 Hence biblical commentators sometimes regard Deut. 21:10-13 as a prohibition of rape on the battlefield. 95 This is not the case, however. The law governs conduct after the victorious completion of combat: "and the Lord your God gives them into your hands" (21:10b). The setting is one where a town has fallen and the victors are assembling captives from among the survivors. The law does not curtail men's rape and subsequent killing or abandonment of women during combat (cf. 20:14). Far from restricting rape in battle, this law gives sanctions to sexual coercion in the aftermath of war. Carolyn Pressler argues that the conditional protasis of the law extends through the phrase whb'th 'l-twk bytk in 21:12a. Thus: "When you go out to battle against your enemies and the Lord your God gives them into your hands, and you take them captive, if you see among the captives a beautiful woman whom you desire and want to marry and bring into your household, then she shall shave her head, and pare her nails." Construed in this way, the effect of the law is to validate a man's long-term possession of a woman whom he has captured by force. In Pressler's view, a primary intent of the law is to provide the means for a man to marry a woman who, as a war captive, has no legally competent family representative to conclude the marriage contract. 97 The woman's parents are presumably dead or enslaved (she is expected to mourn them in v. 13).
I agree with Pressler's reading of the text, but I think it is important to notice that the woman might also have had a husband and children before her capture. 98 The woman whom the victorious Israelite will marry is identified only as an adult female whom the man finds attractive ('sht 'pt-t'r, v. 10) — not necessarily a virgin (btwlh) or an unbetrothed young woman ('shr l'-'rshh n`rh), as such distinctions are respected only within the Israelite community, where a woman's status as the wife of a husband, or a marriageable (unbetrothed) young woman, determines the degree of a man's offense in having unauthorized sexual intercourse with her. From the victor's perspective that this law adopts, the adult male's prerogative over dependent females (sexual access for the husband, right of disposal for the father or guardian) has no validity among defeated enemies. Given that the woman in this passage becomes married to an Israelite as the victim of capture by military attack, how should we regard the sexual relation depicted here? The provision for treatment of the war-captive woman can be viewed as a prohibition of rape only under the premise that women possess no personhood or bodily integrity apart from the determination of men. The fact that the man must wait for a month before penetrating the woman (21:13) does not make the sexual relationship something other than rape, unless one assumes that by the end of the period the woman has consented. Commentators sometimes entertain this notion, perhaps evoking the familiar psychological phenomenon of a captive's identification with her captor. But to assume the consent of the woman is to erase her personhood. Only in the most masculinist of readings does the month-long waiting period give a satisfactory veneer of peaceful domesticity to a sequence of defeat, bereavement, and rape.