

Wheat grows in open fields, where it can pick up bacteria from soil, water and animals. Milling grain into flour does not kill those bacteria. Flour is therefore a raw food, not a ready-to-eat one, even though it looks clean and dry. The germs only die when flour is baked or cooked, which is why FDA and CDC say not to eat raw dough or batter made with any brand of flour.
Cookie dough ice cream from a shop is different. FDA says the dough in shop-bought ice cream has been treated to kill harmful bacteria, so it is meant to be eaten as it is. Dough from a bag, tub or your own mixing bowl is not.