Back in the Bad Old Days of printing, if you wanted to print a book, you had to pull out all the tiny little type letters and set them by hand for each page in the book. And if you didn’t have millions of pieces of type, you had to break up each page once you’d printed it (for however many times your initial print run was) so that you could reuse them in the subsequent pages.
But what if you wanted to, say…be able to print the book again at some point in the future? Well, you’d either have to put the whole thing back together again by hand (very expensive), or you’d have to create a plaster mold of the page that could be cast in metal and printed as a single immovable unit. This was also expensive but not as expensive as having your book typeset again.
The onomatopoetic sound of casting this plate was the French “cliché”: the hissing sound when the lead hit the mold.
So how did it come to have its modern meaning? Well, people joked that with certain set phrases like “better the devil you know”, you might as well cast them as a cliché so that instead of having to put the letters together one at a time, you just grab the “better the devil you know” plate out of your drawer. (Note that, in most cases, this would not actually work.)
The really funny part? The alternative, more formal name for a “cliché” plate was: a stereotype. It got its modern meaning through the idea of an “image perpetuated without change”. Thus we get the idea of a “greedy Jew” or “lazy Mexican” (thank you Engels), as if they were standard plates you could pull out of a drawer somewhere and put in place of the real people, instead of forming your judgments individually by putting letters together one at a time.