Whether or not it makes any sense to you, it's not a matter of any scientific debate - being in a deficit puts you in a catabolic state where the body will break down muscle mass for energy. It does it less if you have lots of protein and are providing frequent muscle stimulus.
These are just a tiny subset of the studies done - google scholar can find you many dozens more, if you desire. And, of course, the fact that these studies exist it all necessarily implies that you lose muscle mass when in energy deficit, as you will see in the control groups for them.