Originally Posted by Andy M.
99 times out of 100, critters in flour did not get into the flour at your home. They got into the flour at the mill. The eggs are so small, the fall through the sifters along with the flour. It's not you or how old the flour is.
I have found bugs in sealed
packages of flour and sealed packages of rice. (Flour is often packaged in paper, not completely secure, but the rice I'm referring to was sealed in a plastic bag so well that the plastic bag was pressurized and still maintained pressure, even though you could see the little bugs scampering around inside. This was a really good lesson to learn!)
As far as inserting your own bugs, I always store all materials of the sort that can become infested in bug proof containers of some sort. In the case of flour I store my GP flour in an air tight container, and all other flour in double plastic bags, tightly sealed.
It is a good practice to buy flour and other similar products in container sizes that you are likely to completely use up within a few or several months, or certainly use up before the use-by date.
However I see no problem in using flour past the use-by date as long as you're careful to give it a very close critter inspection. This includes digging down into lower layers and inspecting them too.
I'm reminded of the story, what's worse than finding a cockroach in your food? (A: half a cockroach!)