system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How can frosting/icing made with dairy be left on an unrefrigerated cupcake for days without spoiling?
gpt
If the sugar concentration in a food is very high, the sugar acts a desiccant and preservative. It literally pulls water out of the cells of microorganisms, mummifying them and thereby preventing them from spoiling the food.

Similarly, if the water has been removed from a dairy product, as with butter, it doesn’t go bad very quickly. Butter is basically just oil and has had most of the water removed from it. So butter can be left to sit out at room temperature for days without going bad.