CB wrote me with some disturbing questions:
So this friend of mine had a jar of organic tomato sauce (maybe it was paste). It was some months old by the time she opened it, but when she did, the lid popped when the vacuum seal was broken. She looked inside to find three largish maggots wiggling around in the sauce. Ew. Ew ew EW!
The question is: how is that possible? The jar was sealed; don't maggots breathe?
Also, just like with canning, the stuff was cooked, right? How could they have lived? And where could they have come from? How could whatever they were hatched from have gotten inside a sealed, sterile environment?
I'd bet the mother insect laid her eggs sometime during the canning process, say when the sauce was cooling in an open vat at the processing plant. Probably the young survived most of the months after canning as eggs, so they would have little need for air. Also, if we're talking a glass jar with a metal lid, there would probably be some air inside. It wouldn't have to be completely airless to seal properly.
In case it's any comfort, I should mention that these wouldn't necessarily be maggots. They could be the larvae of moths or beetles, for example. Moths and their caterpillars are pretty common inside sealed food, especially organic or homemade stuff. All processed food will have some minor contamination from insects. Even in a disgusting case like this, the food was probably safe to eat. (Not that I would have after seeing the bugs, but in theory.) We all swallow an occasional bug leg or rat hair without knowing it, and it does us no harm. Even if these were maggots (fly larvae), they would not necessarily be carriers of disease microbes. Flies have to be mobile adults to pick up nasty bacteria from the wider environment. If these larvae spent their entire lives in cooked food, they had no chance to pick up dangerous microbes. The US government refers to bugs in food as "aesthetic defects," because basically, it's not a health problem. It's just how food is. It's gross, but it won't hurt you.