Does a bathroom scale measure mass or weight? If if measures mass, then how come it changes when you are on the moon?

It measures weight.

But weight also changes on the moon because of the change in gravity.