Those lost calories result in weight loss. If you eat fewer calories than you burn, regularly, (as you described with that example) then you’re in a calorie deficit, and is a guarantee of weight loss
When it comes to muscle growth, that’s a different story. Muscle growth comes from strength training.., the act of strength training in itself doesn’t burn that many calories. Cardio burns calories (though, cutting calories through diet is more effective - cardio just “supplements” a calorie deficit).
You can be in a calorie deficit and build muscle, and while strength training, but you don’t want to be in a very aggressive deficit.
For example, if I burn 2300 calories a day, and eat only 1300… sure I’ll lose scale weight, but I won’t really build muscle. That’s a very aggressive deficit. In a situation where I’m lifting heavy weights, I would want to increase my calorie intake so that I’m still in a deficit… let’s say 1900-2000. And I would want to focus on my protein intake, .8-1g per pound of my goal weight.
Unfortunately, the math of metabolism isn’t this straightforward. People think of it as a simple equation of
calories in minus calories out = weight loss or weight gain
but it does NOT work that way. Studies of people living active tribal hunter/gatherer lifestyle show that in fact, their basal metabolism isn’t much different than a western couch potato. This was an unexpected finding. Please read the work of Herman Pontzer if you are interested. What it means is when you exert 400 calories “moving around”, the body compensates in myriad other ways, to maintain overall metabolic rate. This is also why “calories out” (exertion, walking, exercise) isn’t very effective for weight loss. Weight is almost entirely lost and gained on the intake side of the equation.