How can a scale actually do that? The only way to actually measure %body fat, and even that method actually measure body density, is to be weighed underwater. This allows calculation of the volume of the body, which along with weight measure the regular way, in turn allows density to be calculated.
All a scale could do would be to use some approximation, probably body mass index (BMI), which tends to undervalue muscle mass. Using BMI, most NFL players, and even many NBA players, would be considered overweight and even obese. They aren't.
The scale estimates %fat as a function of the electrical resistance of your body to a weak current. The scales have two metal surfaces for your bare feet. You have to program your sex, height and age group. The measured resistance and weight are then matched to an algorithm for the stored demographic information. The calculated %fat may not be absolutely correct, but the relative changes are nevertheless meaningful. My own %fat has oscillated between 21% (out-of-shape) to %12 (in-shape)! I have no idea what my real fat percentage actually is, but the relative change definitely corresponds to my condition.