This word comes from the Latin word trahō, which means to draw, plunder, drag, or trail. This is where we get traje, the Spanish word for suit, from. How did such an unrelated word, a verb no less, wind up being the word for an article of clothing in Spanish?
This reference explains that the idea of a suit is to draw attention. It also says that, even if ones of the meaning is "to drag" the idea is closer to "to bring" like in "I brought this dress to be properly dressed for the event".
Take into account that
traje no only describes the man suit (with jacket and trousers made form the same material) but also a way or code of dressing (uniform).