Shaking a can of Coke increases the internal pressure due to the release of dissolved carbon dioxide gas, which is a result of changes in thermodynamic properties. The agitation causes the gas to come out of solution, leading to a rapid increase in pressure inside the can. When the can is opened, this pressure is released, causing the liquid to squirt out. The discussion emphasizes the relationship between pressure, temperature, and the behavior of gases in liquids. Understanding these thermodynamic principles clarifies why Coke squirts out after shaking.