The raccoon is named for its hands. Several European languages, though, named it for a habit it does not really have.
English took the word from Powhatan, the Algonquian language spoken around the Jamestown colony in Virginia. Etymonline gives the Powhatan form as arahkun, from arahkunem, "he scratches with the hands."
The colonists heard the word and spelled it however they could. The Word Origins site finds it in John Smith's A True Relation, printed in London in 1608. Describing the chief Powhatan on his bed, Smith wrote that it was covered with a great covering of "Rahaughcums." Sources disagree on Smith's spelling. Etymonline gives raugroughcum, and Wikipedia gives aroughcun, with William Strachey's arathkone. In his 1612 Map of Virginia, Smith described the "Aroughcun" as "much like a badger, but useth to live on trees as Squirrels doe." Other early forms include arocoun and raccoone. The single-c spelling "racoon" stayed common into the twentieth century.
Scientists went a different way. Wikipedia reports that Linnaeus first filed the animal under the bears as a "long-tailed bear." In 1758 he called it Ursus lotor, "washer bear." Its genus became Procyon, Greek for "before the dog," in 1780. German still calls it Waschbär, "wash-bear," and French raton laveur, "washing rat."
Those names come from captive raccoons dunking food in water. Wikipedia says this has not been observed in the wild and is not about cleaning. Wild raccoons feel for food along shorelines and rub it with their paws, and wet paws are more sensitive. The Powhatan name, focused on the scratching hands, was closer to the truth.
Spanish took its word from another American language. Mapache comes from Nahuatl mapachtli, roughly "the one who takes everything in its hands." Two languages, a continent apart, named the animal for the same thing.
The newest name is internet slang. Word Origins finds the earliest clear "trash panda" in a February 2015 tweet. It says early uses come mostly from Canada.