The data the Torah gives us about illness and infection is highly advanced for its time and in some respects it was not until recently that medical science recognised this.
It is not only physical but metaphorical ailments that can come with one’s clothes. This is seen in the rabbinic view that m’tzora, the leper, after whom next week’s sidra is named, can be read as motzi shem ra, purveying evil talk. Using your tongue wrongly is a disfigurement which harms society and also yourself.
Likewise, the type of clothes you wear and the way you wear them can have a negative effect on society. Jewish law expects that a person should dress modestly and not flaunt their clothing or lack of it.
One can criticise the modesty patrols that measure the length of a woman’s dress or sleeves, but how about criticising those who deliberately exhibit far more of their body than a modest person really should?