Why some ingredients can last a long time, but when used it can only last a few days in the fridge?
Do you mean why some ingredients can last longer fresh than they can after cooking?
First because cooking technically starts or catalyzes then decomposition process. You’re breaking down the natural compounds of sugars, proteins, etc. into simpler compounds using heat to make it easier for digestion and the body to absorb nutrients. That means the food that was raw is much more broken down and will decay faster (unless you used some sort of technique for longer term preservation).
Second is because your fridge is actually a breeding ground for molds and bacteria. Albeit, much slower than at room temperature. But the fridge has spores and remnants of previous foods that’s gone bad that will eventually contaminate your leftovers. Fresher foods might resist that more because they haven’t been broken down by cooking yet (though that depends).
Well, from my understanding, some ingredients have natural preservatives that help them last longer, even outside the fridge. For instance, dry goods like rice, pasta, and beans can last for months without spoiling because they have low moisture content and are less likely to harbor bacteria. On the other hand, fresh produce like vegetables and fruits have a high water content and are more prone to decay, so they tend to spoil faster.
However, when you use these ingredients and store them in the fridge, they are exposed to moisture and air, which can accelerate their spoilage. Moreover, some ingredients, like dairy products and cooked meat, are more susceptible to bacterial growth, which can cause them to go bad quickly, even if they were fresh before.
In my experience, it’s always best to use fresh ingredients and store them properly to maximize their lifespan. For instance, you can store fruits and vegetables in the fridge to keep them cool and dry, or freeze them for long-term storage. Additionally, you can use airtight containers to prevent air and moisture from getting in and causing spoilage. By taking these measures, you can extend the shelf life of your ingredients and reduce waste.
Some ingredients, such as dried spices, can last a long time because they don’t contain much moisture and don’t spoil easily. However, when they are used in a recipe, they are mixed with other ingredients that contain moisture, such as dairy or vegetables. This increases the moisture content of the dish and makes it more likely to spoil quickly in the fridge.
Jars, cans, plastic containers, etc can be completely sealed. That means no bacteria, fungal spores or anything else can get in. So if you kill everything in the container at the time of manufacturing, primarily done by heating it up, it will last for a very long time even if not refrigerated.
When you open the container you let bacteria and fungal spores in and they can start to glow. Keeping it in the refrigerator just slows down the growth it does not stop it.