וְרָאִיתָ֙ בַּשִּׁבְיָ֔ה אֵ֖שֶׁת יְפַת־תֹּ֑אַר וְחָשַׁקְתָּ֣ בָ֔הּ וְלָקַחְתָּ֥ לְךָ֖ לְאִשָּֽׁה׃
און װעסט זען צװישן די געפֿאַנגענע אַ פֿרױ שײן אין געשטאַלט, און װעסט זי גלוסטן, און װעסט זי דיר װעלן נעמען פֿאַר אַ װײַב,
Mei HaShiloach
And you desire her and take her as a wife, and you bring her etc and she shaves etc and takes off the clothes of captivity - this is that everything that finds grace in the eyes of Israel certainly has in it something good, yet, it is necessary to make many selections so as to know if this is true grace or some external trapping that met one's eye. That is why it commanded that she should distance herself from all externalities, and after that, if grace is still found in his eyes, then obviously something good is found in her.
Mei HaShiloach
And you see in captivity - and it is written in the Gemarah "Torah only spoke like this due to the inclination to evil" (Kiddushin 21b) - and this is found nowhere [else]. Yet, sometimes the inclination to evil can dominate a person so much that they will not be able to move [spiritually] in any way, and so it is clear that from God it comes, as we find regarding Yehudah [and Tamar] and that is why the Torah revealed this specific law, so that the awareness of the doer will not fall completely.
Rashi
אשת [AND THOU SEEST AMONG THE CAPTIVES] A WOMAN — even if she be a married woman (Sifrei Devarim 211:7; Kiddushin 21b).