Why can you build muscle while losing fat from cardio, but not from a low calorie diet?

Anonymous
I've been reading that you cannot build muscle if you don't consume enough calories, even if you still consume enough protein, because the body uses the protein calories to cope with the calorie deficit for energy instead of using your fat. If that is the case, then why doesn't it do the same thing when you eat normally but just do a lot of cardio?
Why can you build muscle while losing fat from cardio, but not from a low calorie diet?
8 Opinion