The girl in the tower is named after a vegetable. Rapunzel is a German word for a leafy salad plant, and the story explains why.

In the Grimms' version, a pregnant woman longs for the rapunzel growing in a sorceress's garden. The sorceress claims the baby, and she names the child Rapunzel, after the plant her mother craved.

Which plant is less certain. Wikipedia says the rapunzel of the tale is either corn salad or rampion. Rampion is Campanula rapunculus, a bellflower once widely grown in Europe for its leaves. The leaves were used like spinach, and the parsnip-like root was eaten like a radish.

The plant name has a longer root. The species name rapunculus is a diminutive of Latin rapa, "turnip," a nod to the root's shape. Dictionary.com dates English rampion to 1565 to 1575. It traces the word to Middle French raiponce, from Italian raponzo, a derivative of rapa. So Rapunzel means, at bottom, "little turnip."

The name was not part of the story from the start. The earliest recognizable version is Giambattista Basile's Petrosinella, printed in Naples in 1634. Its title means parsley. A French variant, Persinette, followed at the end of the 17th century. It was written by Charlotte-Rose de Caumont de La Force, and Wikipedia gives its date as both 1697 and 1698. Schulz's later German text was a translation of it.

The swap to rapunzel came in Germany. Friedrich Schulz published a German version in his Kleine Romane in 1790. Wikipedia credits Schulz with changing both the plant and the girl's name to Rapunzel. The Brothers Grimm used his version as their direct source and printed the tale in the first edition of their Children's and Household Tales in 1812. They kept revising it, and Interesting Literature notes that the familiar text is their child-friendly version of 1857.

English kept the German name rather than translating it to Rampion. The hair made her famous, but the name is about salad.