So, what's the science behind buttercream frosting and refrigeration? Well, it all comes down to the water content and acidity level of the frosting. If the frosting has a high water content and low acidity level, it's more prone to bacterial growth. But, if it has a low water content and high acidity level, it's less likely to go bad.
It's kind of like preserving a jar of jam - you need to create an environment that's not conducive to bacterial growth. And, that's exactly what refrigeration does - it slows down the growth of bacteria and keeps your frosting fresh for longer.