Cos your body isn't a machine. You have a lot going on in there. There is an answer to this but it is multifaceted.
1) muscle fuel - in and out, levels of glycogen and water inside the muscle
2) Refuelling and hydration level.
3) Repair of muscle cells can cause temporary fluid retention.
Your body weight is not simply fat and muscle. You don't go out - use up calories and fat melts and muscle grows. There is no 'fixed' timescale for how your body processes the food you eat, the exercise you do - the calorie deficit you generate and how your body meets that deficit. It depends on what and when you eat, what type, time, intensity etc of the exercise you are doing, whether you are male or female - already highly trained or just beginning. I am sure there are more factors that I am missing but these are the first few things that spring to mind.