שֶׁלֹּא תִּלְבַּשׁ אִשָּׁה עֲדִי אִישׁ – שֶׁלֹּא יִלְבְּשׁוּ הַנָּשִׁים מַלְבּוּשֵׁי הָאֲנָשִׁים וְלֹא יִזְדַּיְּנוּ בְּזִיּוּנָם, וְעַל זֶה נֶאֱמַר (דברים כב ה) לֹא יִהְיֶה כְלִי גֶבֶר עַל אִשָּׁה. וְתִרְגֵּם אוּנְקְלוֹס לֹא יְהֵא תִּקּוּן זֵין דִּגְבַר עַל אִתְּתָא (עי' נזיר נט א). וּמִן הַדּוֹמֶה כִּי מִפְּנֵי כֵן פֵּרֵשׁ הַכָּתוּב בִּכְלֵי זַיִן, לְפִי שֶׁהֵם הַכֵּלִים הַמְּיֻחָדִים לְגַמְרֵי לָאֲנָשִׁים, שֶׁאֵין דֶּרֶךְ אִשָּׁה בָּעוֹלָם לָצֵאת בִּכְלֵי זַיִן, אֲבָל הוּא הַדִּין שֶׁאָסוּר לָהֶם מִדְּאוֹרַיְתָא לָצֵאת בְּמַלְבּוּשִׁים שֶׁדֶּרֶךְ הָאֲנָשִׁים בְּאוֹתוֹ הַמָּקוֹם לְהִשְׁתַּמֵּשׁ בָּהֶם, כְּגוֹן שֶׁתָּשִׂים בְּרֹאשָׁהּ מִצְנֶפֶת אוֹ שְׁאָר כֵּלִים הַמְּיֻחָדִים לָאִישׁ (עי"ש בתרגום יונתן בן עוזיאל). That a woman should not wear the adornments of a man: That women should not wear the clothing of men and not arm themselves with their weapons. And about this it states (Deuteronomy 22:5), “There shall not be the vessel of a man upon a woman.” And Onkelos translated [it], “There shall not be a weapon of a man upon a woman.” (See Nazir 59a.) And that which is similar [is also prohibited]; since this is the reason that [Onkelos] explained Scripture as regarding weapons — because they are vessels that are completely unique to men, as it is not the way of a woman in the world to go out with weapons. But the same is true, that it is forbidden from the Torah, for them to go out with clothes that it is the custom of the men of that place to use — for example, that she should place a turban on her head or other vessels that are unique to a man. (See Targum Jonathan on Deuteronomy 22:5.)
מִשָּׁרְשֵׁי הַמִּצְוָה. לְהַרְחִיק מֵאֻמָּתֵנוּ הַקְּדוֹשָׁה דְּבַר עֶרְוָה וְכָל עִנְיָן וְכָל צַד שֶׁיִּהְיֶה הַכִּשָּׁלוֹן בְּאוֹתוֹ דָּבָר מָצוּי מִתּוֹכוֹ, וּכְעִנְיָן שֶׁאָמְרוּ זִכְרוֹנָם לִבְרָכָה עַל דֶּרֶךְ מָשָׁל (סנהדרין קו א) שֶׁאֱלֹהֵינוּ שׂוֹנֵא זִמָּה, כְּלוֹמַר, שֶׁלְּאַהֲבָתֵנוּ הִרְחִיקָנוּ מִן הַזִּמָּה, שֶׁהוּא דָּבָר מְכֹעָר בְּיוֹתֵר, וְיִקַּח לֵב הָאָדָם, וּמַדִּיחוֹ מִדֶּרֶךְ טוֹבָה וּמַחְשָׁבָה רְצוּיָה לְדֶרֶךְ רָעָה וּמַחֲשָׁבָה שֶׁל שְׁטוּת, וְאֵין סָפֵק כִּי אִם יִהְיוּ מַלְבּוּשֵׁי הָאֲנָשִׁים וְהַנָּשִׁים שָׁוִים יִתְעָרְבוּ אֵלּוּ עִם אֵלּוּ תָּמִיד, וּמָלְאָה הָאָרֶץ זִמָּה. וְעוֹד אָמְרוּ בְּטַעַם מִצְוָה זוֹ, שֶׁהִיא לְהַרְחִיק כָּל עִנְיַן עֲבוֹדָה זָרָה, שֶׁדַּרְכָּן שֶׁל עוֹבְדֵי עֲבוֹדָה זָרָה הָיָה בְּכָךְ. וְאֵלּוּ שְׁנֵי הַטְּעָמִים מְצָאתִים בְּסִפְרֵי הָרַמְבַּ"ם זִכְרוֹנוֹ לִבְרָכָה (בסהמ"צ לאוין מ, מורה נבוכים ג, לז) אַחַר כָּתְבִי אוֹתָם. It is from the roots of the commandment [that it is] to distance our holy nation from matters of sexual immorality and any matter and any angle whatsoever that contains a stumbling block towards it — as the matter that they, may their memory be blessed, said metaphorically (Sanhedrin 106a) that our God hates promiscuity. [This] means to say, that in His love for us, He distanced us from promiscuity, which is an exceedingly ugly thing, [and which] takes the heart of a man and pushes it off from the good path and from desirable thoughts, to a bad path and thoughts of stupidity. And there is no doubt that if the clothes of men and women were the same, they would constantly mix — these with those — “and the world would be filled with promiscuity.” And they also said in explaining this commandment that it is to distance all matters of idolatry, as the way of the worshipers of idolatry was with this. And I found these two reasons in the books of Rambam (Sefer HaMitzvot, Negative Commandments 40; Guide for the Perplexed 3:37) after I wrote them.
דִּינֵי הַמִּצְוָה. קְצָרִים, בִּפְשַׁט הַכָּתוּב הֵם נִכְלָלִים [שם קפב]. The laws of this commandment are brief. They are included in the simple meaning of Scripture. (See Tur, Yoreh Deah 182.)
וְנוֹהֵג אִסּוּר זֶה בְּכָל מָקוֹם וּבְכָל זְמַן בִּנְקֵבוֹת. וְאִשָּׁה הָעוֹבֶרֶת עַל זֶה וְלָבְשָׁה הַמַּלְבּוּשִׁים הַמְּיֻחָדִים בַּאֲנָשִׁים לְבַד בְּאוֹתוֹ הַמָּקוֹם שֶׁהִיא בּוֹ, חַיֶּבֶת מַלְקוּת. And it is practiced in every place and at all times, by females. And a woman that transgresses this, and wears clothes that are unique only to men in that place that she is in, is liable for lashes.