Even if a condition is improved by losing weight, that is often not the be-all and end-all of treatment - if a patient has high blood pressure, losing weight may help, but they may also need drugs to reduce their blood pressure in the meantime - so they are not at risk of a stroke. Flat feet might be helped by losing weight, but orthotics might be needed too.
And as some posters have said, there are some conditions that affect the joints, but won't be improved by weight loss - like rheumatoid arthritis - and if a patient is just sent away to lose weight, because the doctor has lazily assumed that their joint problems must be down to their weight, their condition won't improve - and in fact more damage, avoidable damage, could be done.
I also think some doctors are quite ignorant about dieting and weight loss - like my GP who told me filling up,on veg was a bad thing 'because vegetables have calories too'. I still kick myself that I didn't say, "Well - 10g of grated cheddar contains 42 calories, and won't fill you up much, but you could have 180g of broccoli or 245g of lettuce for the same amount of calories - so, you can eat plenty of veg and feel full, without having too many calories - how is this a bad thing??"