Ever get pantry moths or pick up a thing of flour or pasta from a sketch grocery store only to find it had nasty little bugs in it (which are probably pantry moth larvae)?
It sucks, it sucks a LOT. And pantry moths are such a bitch to get rid of. (ASK ME HOW I KNOW. UGH.)
Best trick ever to avoid any kind of infestation: when you get flour or pasta from the store, stick it in the freezer for a week before using it. If it does harbor any nasties from the store, the cold will kill them and they won't decide to use your kitchen pantry as a breeding ground and infest everything.
(still check to make sure there aren't any dead bugs before you use it. And if you're my brother, this apparently translates to "keep your flour AND sugar in the freezer," which makes zero sense. But you do you kid. You do you.)