Food starts rotting the instant it’s harvested, and continues doing so while it’s packaged, transported, and stored on the shelf. Modern flash freezing techniques preserve foods perfectly, halting the microorganisms that cause decomposition, and avoiding the damage caused by large ice crystal formation that’s inevitable with slow domestic freezers.
Interestingly with the sweetcorn, it used to be that it had to be eaten immediately after harvest, so much so that you’d have the water boiling before even picking them. However with modern developments they can remain fresh much longer.