Sugar and caffeine are diuretics, meaning they dehydrate your body. The biochemical balance of your cells get disrupted and you no longer have Electrolyte Homeostasis (proper cell hydration).
Increasing fat and reducing cabs and protein significantly puts your metabolic state into ketosis—fat burning instead of glucose burning. Ketosis or ketones are naturally produced molecules created by the liver. Using ketones for fuel instead of glucose, your body is burning your fat as energy.