Flea market comes from the French marché aux puces, a name originally given to a market in Paris. The fleas were thought to be in the goods, because they were of the kind to attract vermin. The earliest English use we have found dates from 1922.
It comes from the French phrase "marché aux puces" ("market where one acquires fleas") as dislodged merchants continued selling their wares in the north Paris in front of the gate Porte de Clignancourt after the alleys and slums were demolished and they were thrown out. The gathering together of all these exiles from the slums of Paris was soon given the name.