Airtight packaging doesn't slow down bacteria growth. There are a few myths about them which don't apply in practice:
- Bacteria are not kept out, despite popular belief – the air within the container has as many bacteria as the air outside. The food in the container also has bacteria – cooking doesn't sterilize food! – so you cannot keep the bacteria out that way.
- The container is still full of oxygen. You don't get the effect of lowered-oxygen atmosphere that is sometimes used in packaging from industrial food producers.
These two hold whether your food is in the fridge or not – so storing the food in an airtight container outside of the fridge doesn't change anything about its safety either. *
The one way it helps with food safety is an edge case: if you forget something until it molds or spoils, the now-high levels of pathogens won't contaminate something else, exposing it to more than the normal "background" level.
The airtight container doesn't help with food safety, but it is quite good for food quality and has other convenience aspects:
- if you put fresh fruit or vegetables in it, or cheese, you get a nice level of humidity, and vegetables stay crisp longer/cheese and other stuff doesn't dry out
- many foods either emit or soak up smells. The airtight container prevents it.
- if you have a mishap and drop something in the fridge, or a fermenting bottle of something spills over, it won't land in an open bowl of something else
- modern containers have an almost-rectangular shape, which uses up the space in the fridge very efficiently, and allows stacking.
- modern containers, as well as humble jars, are mostly transparent – so if you store the food in them as opposed to the pot in which you prepared it, it is easier to see what is where without opening lids
- if you prepared food in a reactive pan (or even something not-very-reactive like seasoned cast iron) and store the leftovers in it, you are giving the pan time to react with the food and corrode and/or change the taste of the food. Food storage containers are nonreactive.
So the airtight containers are best practice for quality reasons. And non-air-tight containers, which have a loosely fitting lid (no visible holes, but also no gasket, such as a stock pot or a skillet covered with a lid) will give you about 80-90% of the desired effect.
* to be pedantic, it can interfere in one way: if you intend to store hot non-shelf-stable food outside for a short time, and are afraid it will enter the danger zone, a closed lid will slow down the time it cools down. But I suppose not many people keep a wireless temperature probe in their airtight container, so the point is quite moot in practice.