When an increase and then a rapid decrease in heat occurs, bacteria such as lactococci and lactobacilli can form. ... Milk actually spoils when bacteria converts the lactose into glucose and galactose, which results in the production of lactic acid.
Basically bacteria, milk is full of bacteria, like many other foods, pasteurization kills some of the worst bacteria, but will not kill all of it. The more lactic acid produced by the bacteria...the faster it starts to first sour, then curdle and spoil.
I'm curious about this myself. I make cakes at work, some with buttercream frosting (which contains
a small amount of milk), some with cream cheese frosting. The cakes with cream cheese frosting,
we always keep refrigerated. The ones with buttercream frosting, we keep at room temp.
I'm wondering if the buttercream is OK because it contains so little milk (and the "butter" we use is
actually margarine, with no dairy content). And anything frosted with whipped cream is kept refrigerated
as well. Anyway, when in doubt, refrigerate it, don't take chances with vengeful dairy products!
That nasty liquid stuff in cartons? (I can still smell it by memory...I hated that smell). We kept it under refrigeration due to the heat in the bakery. It is supposed to be shelf stable for 3-5 days though. Any milk in there I think is powered or very trace...it's like pure grease when it breaks down.
People loved that stuff...I still can't eat a cake with it on.
People get pissed off at me at parties because most of the time I won't eat cake, and if I do I normally end up scraping the icing off. 15+ yrs as a cake decorator...once in a really blue moon I might make up some seven minute frosting...otherwise I like my cake naked.