Understanding the science behind these desserts can help you make better choices to truly beat the heat during the hottest months.