Corn flakes were invented primarily as a health food by Dr. John Harvey Kellogg in the 1890s. The original purpose was to create a simple, easily digestible breakfast cereal that would help patients at the Battle Creek Sanitarium with digestive issues. Dr. Kellogg aimed to provide a bland, vegetarian diet that he believed would promote "biological living" and improve overall health, including reducing digestive problems like indigestion. There is also a widely circulated but somewhat misunderstood background: Dr. Kellogg, a religious and health reformer, believed that bland foods like corn flakes could reduce sexual urges and prevent masturbation, which he considered unhealthy and immoral. However, the primary medically motivated reason for inventing corn flakes was to serve as a digestible, healthful food for patients, not solely as a means of preventing masturbation. The invention happened somewhat by accident when a batch of wheat dough was left out, then rolled and baked into flakes, which patients found easy to eat. The invention was refined and later commercialized by Dr. Kellogg and his brother Will Kellogg, who turned it into the popular breakfast cereal known today.