At the beginning of Ki Seitzei (Devarim 21:10-14), the Torah permits a soldier at war to take a woman from the captives as a wife, but only after he shaves her head, grows out her nails, removes her attractive clothing, and has her be in his house, crying over her parents, for one month, in order that he no longer find her attractive. If he still wants to marry her, he may, but if he doesn't, he must set her free; he may not sell or enslave her.
Why is this permissible? How is it fair that because the man has a desire for her (see Rashi to v. 11, from Kiddushin 21b), he gets to torture her to try to overcome his desire (see Rashi to v. 12, from Yevamos 48a, and to v. 13, from Sifrei 213)? What did she do wrong? She was having a pleasant life, possibly married with a family of her own (see Rashi to v.10, from Kiddushin 21b). And then this guy comes along, with a strong desire, and he just tortures her to get a handle on himself? How is that right?