There's been a lot of misdiagnosis due to doctors just thinking it's a weight issue. I think that's one of the reason people have an issue with doctor's handling of weight.
The other area is that it often ignores that the patient is already actively aware, and trying to combat their weight gain. The doctors are not being helpful by just stating the obvious.
Lastly, many doctors are kind of outdated in their knowledge, they'll recommend old diets that are not as effective anymore, or they won't encourage exercise, just diet, or they won't consider family history, and so on.
In those cases, your "doctor bringing it up" can actually just lead to more weight gain, because it can create increased cortisol level from stress and worries, make you more depressed, and so on, which won't help you lose weight.