because the colder it is the more “fizz” the liquid can hold. So when you pour a can of warm soda, it fizzes and the foam goes away, but when you pour it on ice or if it’s cold, the longer it takes for the carbon dioxide to release…learned it in chemistry, it was some gas law