When you eat a meal, your body spends a few hours processing that food, burning what it can from what you just consumed.  Because it has all of this readily-available, easy to burn energy (thanks to the food you ate), your body will choose to use that as energy rather than the fat you have stored.  This is especially true if you just consumed carbohydrates/sugar, as your body prefers to burn sugar as energy before any other source.
Finally, note that fasting to induce ketosis can also trigger a set of symptoms often known as the “keto flu.” Fasting ketosis symptoms may include decreased energy levels, increased cravings, digestive issues, muscle aches and dizziness. These symptoms can last between a few days to a few weeks when starting the ketogenic diet, but they typically subside once your body enters ketosis and begins to adapt.
Not only that, but growth hormone is increased during fasted states (both during sleep [5]and after a period of fasting). Combine this  increased growth hormone secretion:[6], the decrease in insulin production (and thus increase in insulin sensitivity [7]), and you’re essentially priming your body for muscle growth and fat loss with intermittent fasting.