The graham cracker is a cookie of sorts, common in the United States, which is typically sweetened with sugar, honey, and/or cinnamon. The current recipe is a far cry from their original one — a mild, unsweetened biscuit made of unbleached flour with bran and wheat germ added. Graham crackers were originally invented in the early 1800s by a Presbyterian minister by the name of Sylvester Graham, who introduced this snack item as part of his then-radical vegetarian diet which eschewed white flour and spices.

Why? Graham hoped to end what he believed to be the scourge of his time: masturbation.

Graham, one of seventeen children, found sexual urges to be something to be repressed, and found “self-abuse” — a colloquialism common in the 1820s and 1830s — to be a particular ill of society. By some combination of pseudoscience and faith, he concluded that a vegetarian diet consisting of fruits, vegetables, limited dairy, and bland starches would result in an end to lustful behavior. For the last two decades of his life, Graham (who died at age 57) preached that his diet, later called the Graham Diet, would help those who followed it (called Grahamites) abstain from sexual activity, and, in particular, from self-love, which Graham argued led to insanity and blindness.

The Grahamite movement waned after its leader’s death in 1851, but one man in particular stayed true to Graham’s bland food (and sexual abstinence) edict. That man, Dr. John Harvey Kellogg, was the superintendent of the Battle Creek Sanitarium in Michigan, and he insisted that patients abide by a similar diet. When his brother, Will Keith Kellogg, the sanitarium’s bookkeeper, accidentally left cooked wheat out, letting it go stale, the Kelloggs decided to try and force it through the rollers anyway. Instead of softening, the wheat came out hard, and in flake form. Dr. Kellogg served the flakes, which were genuinely well received by the sanitarium’s patients.

But while Dr. Kellogg was a Grahamite of sorts, his brother Will was not. Will saw a mass market opportunity by adding a touch of sugar to the corn flakes, causing a rift between himself and his steadfast brother. Will founded the Kellogg’s corporation, now an $18 billion company; John focused on “rehabilitating” masturbators, and, per Wikipedia, at times resorted to mutilation.

Bonus fact : For a while, Oberlin College in Ohio adopted the Graham diet, going meat-free, as well as eschewing condiments and seasonings, according to the student newspaper. These items were banned outright, even if you brought it into the dining hall yourself. But one day, a professor named John P. Cowles decided to challenge the system by bringing a pepper shaker to a meal there, and found out that the rules were taken quite seriously — he was fired. But a year or so later, student dissatisfaction with the rules ended up crescendoing, finally culminating in a return to more typical dining hall fare.

From the Archives: Headless Potato: The not-so-curious history of Mr. Potato Head.

Related: Graham crackers.