(Devarim 23:15) "For the L-rd your G-d walks in the midst of your camp … And let your camp be holy": Make it holy — whence it was ruled: One should not recite the Shema near the washers' dippings, nor should he enter a bathhouse or a tannery with scrolls or tefillin in his hand.
"to save you and to deliver your foes before you": If you do all that is stated herein, in the end He will save you and deliver your foes into your hand.
"that He not see in you a thing of nakedness and turn away from you" — whence it is seen that ervah (illicit relations) causes the Shechinah to depart.
(דברים כג טו) כִּי ה׳ אֱלֹהֶיךָ מִתְהַלֵּךְ בְּקֶרֶב מַחֲנֶיךָ, מִכָּן אָמְרוּ לֹא יִקְרָא אָדָם אֶת שְׁמַע בְּצַד מִשְׁרָה שֶׁל כּוֹבְסִים, וְלֹא יִכָּנֵס לֹא לַמֶּרְחָץ וְלֹא לַבֻּרְסְקִי וּסְפָרִים וּתְפִלִּין בְּיָדוֹ.
(Devarim 23:15) "For the L-rd your G-d walks in the midst of your camp … And let your camp be holy": Make it holy — whence it was ruled: One should not recite the Shema near the washers' dippings, nor should he enter a bathhouse or a tannery with scrolls or tefillin in his hand.
לְהַצִּילְךָ וְלָתֵת אוֹיְבֶיךָ לְפָנֶיךָ, אִם עָשִׂיתָ כָּל הָאָמוּר בָּעִנְיָן לְסוֹף שֶׁהוּא מַצִּילְךָ וְנוֹתֵן אֶת אוֹיְבֶיךָ לְפָנֶיךָ.
"to save you and to deliver your foes before you": If you do all that is stated herein, in the end He will save you and deliver your foes into your hand.
וְהָיָה מַחֲנֶיךָ קָדוֹשׁ, קַדְּשֵׁהוּ. מִכָּן אָמְרוּ: לֹא יִכָּנֵס אָדָם לְהַר הַבַּיִת בְּמַקְלוֹ וּבְמִנְעָלוֹ וּבַאֲפֻנְדָּתוֹ וּבְאָבָק שֶׁעַל גַּבֵּי רַגְלָיו.
וְלֹא יִרְאֶה בְךָ עֶרְוַת דָּבָר וְשָׁב מֵאַחֲרֶיךָ, מְלַמֵּד שֶׁעֲרָיוֹת מְסַלְּקוֹת אֶת הַשְּׁכִינָה.
"that He not see in you a thing of nakedness and turn away from you" — whence it is seen that ervah (illicit relations) causes the Shechinah to depart.