There are many factors the general public is not aware of but that play a major role in food shelf life; the whole field of "food technology" is pretty amazing and under appreciated.
Chemical treatments are not the only factor- in terms of fresh commodities (fruits and vegetable) varieties grown play a big role; so too might post-harvest treatments such as irradiation (might be for phytosanitary reasons, but often can extend shelf life if the commodity can withstand it and remain high quality), nano particle coatings that reduce water loss and spoilage.. these are just a few of the things that are going on "behind the scenes" to make our food last longer and reduce food waste.
If you would like to learn more here is a good review on physical treatments specifically for cereal crops: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5920410/ . There is an awful lot that goes into "food quality", and there are important trade offs with every choice.