Fruits and vegetables have high amount of moisture more specific high water activity(amount of free water available for the growth of microorganisms) and moderate pH range which is suitable for the growth of various types of microorganisms (which grows in moderate temperature range) so by lowering the temperature through cold storage the growth of microorganisms is retarded.Anyhow on an average if the fruit/vegetable is in a good condition and you can eat that then it can be stored for about 4–5 days.
On the other hand grains have low moisture content so bacteria will not grow.They do not contain any water and are solid and dry.
Regards