I thought flour got little bugs in it after storing it too long. I don't remember the exact details
You can prevent them by simply putting things like flour bags in air-tight sealable containers. If you catch some weevils in a bag of flour before it turns into an infestation, you can freeze the flour for four to six days to kill any eggs and larvae and sift out the remains.
If you don't mind the very slight possibility of flavor contamination, you can also store garlic cloves or bay leaves openly near your flour, which naturally repel weevils.