Why does oranges kept outside for long time not get spoilt?

This statement is inaccurate. Oranges, like most fruits, do get spoilt or decay when kept outside for a long time. Decay is a natural process caused by microorganisms such as bacteria and fungi present in the environment.

These microorganisms break down the organic matter of the fruit, consuming sugars and nutrients and, releasing waste products, often characterized by changes in texture, color, and odor. Unless certain preservation techniques are used (such as refrigeration or chemical treatments), organic materials like oranges will eventually decay when exposed to ambient conditions for an extended period.