Fresh apple cider is raw pressed apple juice with no preservatives, so it spoils quickly and can carry bacteria from the fruit. The FDA says untreated (unpasteurized) juice and cider should be kept under refrigeration, and it has traced foodborne illness outbreaks to cider that was not treated to kill harmful bacteria such as E. coli O157:H7.
Cold storage also slows the natural yeasts in cider. University of Tennessee Extension notes that fresh cider lasts only a few days at room temperature, keeps its quality for up to about two weeks at 32 to 36°F, and, if left to sit, ferments into a fizzy, slightly alcoholic drink or turns to vinegar. Cider can be frozen for a year or longer. Pasteurized cider sold in sealed shelf-stable bottles does not need refrigeration until it is opened.
Source: U.S. Food and Drug Administration, “What You Need to Know About Juice Safety”. See also University of Tennessee Extension, “Home Apple Cider Production” (SP307-O).
Image: Pasteurized apple cider from Jericho Cider Mill, New York, photo by Hayden Soloviev (CC BY 4.0), via Wikimedia Commons.