Parshat כי תצא has seventy four Mitzvot. This is the most Mitzvot of any Parsha in the Torah.Rabbeinu Bechaye writes that the theme of the Parsha is that we must overcome our תאוות, lusts.
King David said that he needed to direct his תאוות so that they not be an obstacle in serving Hashem.
If one’s heart is שלם, pure, he will not give in to these lusts. Hashem asks that לבך לי, your heart should be with Me and not giving in to your physical desires.
The connection to this idea comes from the case of the יפת תואר, the woman taken captive in battle. The Rabbis say, דיברה תורה כנגד יצר הרע, that the Torah is speaking opposite the evil inclination.
A marriage based solely on physical attraction cannot last. This was the hope in giving a thirty day separation. Perhaps the relationship could be elevated. Or, perhaps common sense will set in with the realization that this type of bond is destined to fail.
The lesson here is to be aware of that which we need to overcome. If one wishes to beat these תאוות, he will receive help from שמים.