Chocolate milk in boxes lasts longer because the manufacturers pasteurize all the bacteria, including ones that cause it to spoil.