The old adage “clothes make the man” means, basically, that the way we appear reveals our character. The way we dress, in addition to our bearing and our actions, becomes a reflection of our personality. These are the things that other people see. These are the things that other people judge.
It was ever thus. In Hamlet, the famous scene in which Polonius gives his son long-winded advice (“Neither a borrower nor a lender be”) includes the line “the apparel oft proclaims the man.” But notice what immediately precedes this sartorial remark:
Costly thy habit as thy purse can buy,
But not express'd in fancy; rich, not gaudy;
For the apparel oft proclaims the man
The word habit in this instance means “clothing” and not “something that a person does often in a regular and repeated way.” This is, in fact, the oldest meaning of habit in English, one that is preserved today only in “nun’s habit” or “monk’s habit” and “riding habit” (clothes worn for horseback riding). But these slightly unusual terms for costume for a particular profession or purpose were derived from the basic meaning of “clothing,” which is now archaic.
Like so many Latin-based words that appeared in English in the centuries following the Norman Conquest, habit comes from French. Indeed, the modern French word for “clothes” is habits (pronounced \ah-bee\). Use of the word in Middle English by Chaucer is found in The Canterbury Tales:
In kynges habit wente hire sones two.
(Her two sons went about in kingly attire.)
In English, habit progressed from meaning “clothing” to “clothing for a particular profession or purpose” to “bearing, conduct, behavior”—the word’s very evolution seems to mirror the premise that “the clothes make the man.” From “what one wears” to “how one conducts oneself,” habit continued to evolve, referring to appearance (“a man of fleshy habit”) and mental makeup (“a philosophical habit”) before, after several centuries in English, it came to mean repeated activity: “a behavior pattern acquired by frequent repetition.”
Shakespeare, never one to shy away from polysemy, used habit with this meaning also, in a passage from Two Gentlemen of Verona:
How use doth breed a habit in a man!
This shadowy desert, unfrequented woods,
I better brook than flourishing peopled towns:
Here can I sit alone, unseen of any,
And to the nightingale's complaining notes
Tune my distresses and record my woes.
The specific development of habit to refer to drug addiction began in the 19th century, with reference to opium.
Interestingly, even though “clothing” is the oldest meaning of habit in English, it wasn’t the original meaning of its root word, habitus. In Latin, the original meaning was “state of being” or “condition.” Here’s a passage from Cicero:
Nam virtus est animi habitus naturae modo atque rationi consentaneus.
(For virtue is a condition of the mind, consistent with nature, moderation and reason.)
There are also more literal uses, such as this one, from Celsus, author of a Roman medical treatise:
Colorem eius (sc. sanguinis) habitumque oportet attendere
(It is necessary to pay attention to its (the blood’s) color and condition.)
Our most usual use of habit today, “acquired mode of behavior,” didn’t exist in Latin—habitus went from meaning “condition” to “how one conducts oneself” to “clothing.” That it was adapted into English in precisely the reverse order is an accident of history; the order of meanings absorbed from one language to another rarely constitutes a logical development. As with all language, meaning is established by usage and force of habit.