The amount of lean muscle mass is relative to the amount of calories your body burns at rest. So essentially, muscle = metabolism. There is no better way to burn more calories than to build muscle and there is no better way to burn less calories than losing muscle.
Yo-yo or starvation diets do not work long-term because they are dependant on too drastic reduction of calories which results in a wasting of muscle and a decrease of the BMR (basic metabolic rate). Also NASM brings up a great point that if you are not working out you will not add muscle and therefore a reduction in muscle from just dieting will happen.
If you are following a good nutrient dense diet with plenty of strength training you will build muscle and burn more calories at rest.
With most of my clients they will do the following as an example:
A woman is 160 lbs at 30% fat. She may start with 1200 - 1400 calories because her body just does not have much muscle and does not burn as many calories. As she gets in better shape and starts adding lean tissue I do the opposite of what you would expect. I encourage the increase in calories because her lean mass has increased needs more calories to maintain that new muscle. Hence, we have just increased her metabolism, she can take in more calories (which everyone wants) and she is burning more fat.
There is a limit to everyone but the better in shape you get and more lean muscle you build the more calories you can consume and still lose fat.
Plus adding muscle and strength keeps your bones, heart and many other things more healthy.