Raw flour can be dangerous to consume due to its high levels of bacteria. Flour does not generally go through a heat treated process to kill off pathogens. These pathogens, when eaten raw in products such as raw cookie dough, can make consumers sick.
In 2009 an E. coli outbreak occurred due to Nestle Toll House cookie dough, as noted by the WebMD news archive. There were 77 people in 30 states affected by the outbreak and all were after eating the Nestle Toll House cookie dough without baking it first. 35 people were hospitalized which prompted the immediate recall of 3.6 million packages of cookie dough.
At first, the culprit for the outbreak was thought to be the raw eggs, but after closer examination the CDC and FDA were left to only assume the contaminant was raw flour. At that time it did not go through any heat treatment processes to kill off pathogens like the other ingredients found in the cookie dough. Since that incident, several manufacturers, including Nestle, started implementing a heating process in their factories to reduce bacteria in the flour in hopes of avoiding any further outbreaks.