Hello Arthur. It is completely understandable to find this unsettling, especially when you take great care in maintaining a clean kitchen and choosing wholesome, natural ingredients.
The truth is that these insects, commonly grain weevils or flour beetles, did not find a way into your sealed jars from the outside. Instead, their microscopic eggs were already present in the grains or flour when you purchased them.
Because whole grains and unrefined flours undergo minimal processing, female weevils can bore into kernels in the field or storage silos to deposit their eggs before sealing them with a protective secretion. These eggs are virtually invisible to the naked eye. When the jars sit in a warm, room-temperature pantry over time, the environment allows those dormant eggs to hatch, develop through the larval stage, and emerge as adult beetles inside the sealed container.
To prevent this from happening in the future, I recommend a simple kitchen habit: whenever you bring home new whole grains, spelt, or flour, place the sealed packages directly into your freezer for 48 to 72 hours. The freezing temperature neutralizes any microscopic eggs or larvae. Afterward, you can safely transfer the grains into your airtight glass containers and store them in a cool, dry place without worry.