I wonder how "garnish" got to be a legal term for attaching wages of a debtor.

Garnishment \Gar"nish*ment\, n. [Cf. OF. garnissement
protection, guarantee, warning.]
1. Ornament; embellishment; decoration. --Sir H. Wotton.

2. (Law)
(a) Warning, or legal notice, to one to appear and give
information to the court on any matter.
(b) Warning to a person in whose hands the effects of
another are attached, not to pay the money or deliver
the goods to the defendant, but to appear in court and
give information as garnishee.

3. A fee. See Garnish, n., 4.