As a Rule of Thumb For Most Foods: The Quicker Food Rots/Decomposes/Spoils, The Healthier it is For You
This is a rule of thumb, and not a law, because there are other factors to consider and problems with comparing one nutritious food to another.
Consider, a potato can sit on the counter longer than uncooked meat, and both are natural and have nutrients, but they are also so otherwise different in macro and micronutrients that determining which one is healthier is a somewhat semantical argument.
Yet, if we leave a candy bar and berries out, we can confirm the berries will spoil faster, and here our rule of thumb shows itself to be useful.
Exceptions: Some foods are naturally preserved, like Honey. Honey does not fit this rule, nor do dried berries, some dried grains, some oils, nuts, pickled foods, or coffee and tea.
Other rules: In an even more general statement, “if an edible food rots, it is most likely healthy for you.” You should also consider, “if a food is naturally preserved, like honey, it does not fit this rule of thumb.”
On grains, beans, and such: These are a mixed bag. Processed grains are on the less healthy side, same for processed beans, same for corn and soy. Here we can equate this too to a related general rule: “dead, processed foods (the kind that have a long shelf life), tend to be less healthy for you than living foods designed to be consumed quickly (the kind that rot first).
TIP: See a list of 20 foods that spoil the fastest. Notice they are all what we would generally consider “healthy.”
Why Foods Spoil and How that Relates to Nutrients
The Above is explained by the the fact that all living organisms, including the Microorganisms that are part of what causes food spoilage, all eat the same general thing (food that is high in nutrients).
Many of our modern processed foods are often designed to appeal to humans, but are low in nutrition and include preservatives. A human might think of a candy as more appetizing than a veggie, but microorganisms aren’t as easy to fool.
TIP: Food spoils because of: air and oxygen, moisture, light, microbial growth, and temperature. So it isn’t only explained by microbial growth alone. With that said, microbes require oxygen, light, and thrive at certain temperatures (thus this is mostly all related).
How Food Spoilage Affects the Food Economy and Our Diets
This whole truism speaks to an important point, that is healthy foods are harder to store and ship (and thus costs more for the end user).
This truism is part of what causes “whole foods” to have higher prices. Meanwhile processed and uncooked soy, corn, and rice have a very low spoilage rate and can be shipped all over the world with ease (this doesn’t mean grains, soy, corn, grains, and other such products aren’t healthy, it only implies that the processed versions and the processed byproducts generally fit our rule of thumb; so we aren’t only talking “corn,” but corn syrup).
This, and other realities regarding the farming process, lead to subsidies being primarily provided to soy, corn, and rice, and not other fruits and veggies, and results in supermarkets being full of low-cost processed foods that are naturally low in nutrients (they often have nutrients added in).
There are a thousand ways to go with this topic (including making points about small farmers, eating organic, subsidization lining up with economics and not nutrition, big Agriculture, and supply and demand in the market), but in general, we can generally confirm “the quick a food rots, the healthier it is for you.”
The bottomline: A diet focused on foods that rot is a diet focused on nutrient rich and natural foods. Keep in mind you can personally freeze healthy foods to expand their lifespan.