John Gill's Exposition of the Bible
Deuteronomy 22:5
The woman shall not wear that which pertaineth unto a man
It being very unseemly and impudent, and contrary to the modesty of her sex; or there shall not be upon her any "instrument of a man" F6, any utensil of his which he makes use of in his trade and business; as if she was employed in it, when her business was not to do the work of men, but to take care of her house and family; and so this law may be opposed to the customs of the Egyptians, as is thought, from whom the Israelites were lately come; whose women, as Herodotus F7 relates, used to trade and merchandise abroad, while the men kept at home; and the word also signifies armour F8, as Onkelos renders it; and so here forbids women putting on a military habit and going with men to war, as was usual with the eastern women; and so Maimonides F9 illustrates it, by putting a mitre or an helmet on her head, and clothing herself with a coat of mail; and in like manner Josephus F11 explains it,
``take heed, especially in war, that a woman do not make use of the habit of a man, or a man that of a woman;''
nor is he to be found fault with so much as he is by a learned writer {l}, since he does not restrain it wholly to war, though he thinks it may have a special regard to that; for no doubt the law respects the times of peace as well as war, in neither of which such a practice should obtain: but the Targum of Jonathan very wrongly limits it to the wearing fringed garments, and to phylacteries, which belonged to men:
neither shall a man put on a woman's garment;
which would betray effeminacy and softness unbecoming men, and would lead the way to many impurities, by giving an opportunity of mixing with women, and so to commit fornication and adultery with them; to prevent which and to preserve chastity this law seems to be made; and since in nature a difference of sexes is made, it is proper and necessary that this should be known by difference of dress, or otherwise many evils might follow; and this precept is agreeably to the law and light of nature: it is observed by an Heathen writer F13, that there is a twofold distribution of the law, the one written, the other not written; what we use in civil things is written, what is from nature and use is unwritten, as to walk naked in the market, or to put on a woman's garment: and change of the clothes of sexes was used among the Heathens by way of punishment, as of the soldiers that deserted, and of adulteresses F14; so abominable was it accounted: indeed it may be lawful in some cases, where life is in danger, to escape that, and provided chastity is preserved: