My girlfriend's grandma has made pickled cucumbers for decades and distributed them to her whole family.
They are delicious, despite the jars looking like swamp water.
On one occasion, we got her some new jars and she later said that the older jars were better because they are not as tight as the new ones. Apparently they produce some gas and need to vent and I noticed that the sides of the jars show some dried liquid, so it is clear they all leak somewhat.
So, I'm wondering how can food which is not airtight and not refrigerated can last for months without spoiling? She's been doing that for 50+ years so somehow the technique works, but I'm curious about it.
Edit:
Today I had the opportunity to question grandma about her method :)
She's 85 so she just knows what's she's always done :) the pickling is not using any heat, it's cucumbers, vinegar, salt, tons of spices and herbs. she puts everything in jars that will 'gas out' and leak for a few days, and then after that another process seems to take place where the jar seals itself, doesn't leak anymore and becomes harder to open, so I guess the air inside is somehow consumed.