The apple, that innocent bud of an Americana autumn, has pulled off one of the greatest cons of all time. As students across the country prepare to greet a new school year and teacher with a polished bit of produce, the apple cements its place in the patriotic foods pantheon despite its dodgy past.

A clever bit of biology, well documented in Michael Pollan’s Botany of Desire, and a tireless cheer campaign of fall orchard visits and doctor-endorsed slogans saved the apple from its bitter beginnings in early America. Though its standing in society today is rivaled only by bald eagles and baseball, the apple’s journey to ubiquity was tumultuous.

Stretching back to the hills of Kazakhstan, early apples were a far cry from today’s sweet, fleshy varieties. As Pollan explains, sweetness is a rarity in nature. Apples benefitted from being bitter and sometimes poisonous because it allowed the seeds to spread unmolested. Because each seed has the genetic content of a radically different tree, the fruit came in countless forms, “from large purplish softballs to knobby green clusters.”

When the apple came to the American colonies, it was still a long way from a sweet treat. Bitter but easy to grow, the produce made excellent hard cider. In a time when water was considered more dangerous than consuming alcohol, hard cider was a daily indulgence. Its distilled cousin, applejack, also became popular, according to documentation from Colonial Williamsburg.

As anyone who grew up in the Ohio River Valley knows, the greatest champion of the fruit was a wandering missionary named John Chapman, or Johnny Appleseed. Pennsylvania, Ohio, Indiana and beyond bloomed in the wake of his visits. He was opposed to grafting, the practice of inserting “a section of a stem with leaf buds is inserted into the stock of a tree” to reproduce the same type of apples from the first tree, as described by the University of Minnesota.

Without the human intervention, however, apples remained overwhelmingly bitter and when an anti-alcohol fervor swept the nation in the late 19th century, the plant’s fate was in peril. One of the fiercest of opponents, temperance supporter and axe-wielding activist Carrie Nation, went after both growers and bars, leaving a wake of destruction in her path. Nation was arrested 30 times in a ten-year span for vandalism in the name of her movement, according to PBS.

“But with the help of early public relations pioneers crafting slogans such as “an apple a day keeps the doctor away,” the plant quickly reinvented itself as a healthy foodstuff,” according to the PBS production of Pollan’s work.

Elizabeth Mary Wright’s 1913 book, Rustic Speech and Folk-lore, recorded the use of apples as part of common kitchen cures. “For example,” she writes, “Ait a happle avore gwain to bed, An’ you’ll make the doctor beg his bread…or as the more popular version runs: An apple a day Keeps the doctor away.”

Free to produce a socially acceptable fruit, growers raced to develop sweet, edible varieties that would replace the plant’s previous life. Shaking its association with hard cider and reckless imbibing, the apple found a place in one of the most faultless places of American society: the schoolhouse.

Held up as the paragon of moral fastidiousness, teachers, particularly on the frontier, frequently received sustenance from their pupils. “Families whose children attended schools were often responsible for housing and feeding frontier teachers,” according to a PBS special, titled “Frontier House, Frontier Life.” An apple could show appreciation for a teacher sometimes in charge of more than 50 students.

Apples continued to be a favorite way to curry favor even after the practical purpose of feeding teachers disappeared. Bing Crosby’s 1939 “An Apple for the Teacher,” explains the persuasive allure of the fruit. “An apple for the teacher will always do the trick,” sings Crosby, “when you don’t know your lesson in arithmetic.”

By the time American scholar Jan Harold Brunvand published his book, The Study of American Folklore, in 1968, the phrase “apple-polisher” was more or less shorthand for brown-nosing suck-up. With cutting-edge technology in classrooms seen as an academic advantage, many teachers may be asking for a completely different kind of apple: not a Red Delicious or Granny Smith but an iPad.