And furthermore, it becomes very difficult once you move past 'beginner' stage of training (2-4 months) to both gain muscle mass while losing fat.
Why?
Because you need to have extra calories to gain lean mass, and a calorie deficit to burn fat.
If you try to do both, you sacrifice speed on both...meaning you may only lose .5lbs of body fat per week, and only gain .1lbs of lean mass. Meanwhile if you were strictly trying to lose fat, you could lose 1.5lbs of fat a week, or you could bulk up more weight in a week.
Thus, weight is somewhat useless unless you know your % bodyfat. If you know both, you can calculate lean body mass, and watching that figure go up or down is a lot more useful than total body weight.