It’s just based on data. Weighing people doesn’t do anything particularly useful. The advice is the same whether they weigh you or not. Exercise, eat well, etc. And for people who don’t want to be weighed, they’re more likely to avoid doctors and have even worse health.
If weight is needed for a medication dosage, they will take it.