Wheat dough when kept in open for few days, following activities takes place:
1. formation of fungus
2. reproduction of yeast
These fungus and yeast when present in dough, it will become unfit for eating or for use. Since formation of fungus takes place in dough, so it gives a foul smell.
Carbohydrates in wheat dough encourage growth of yeast and other sapfophytic fungi which break down carbohydrates, and emit a foul smell.