That also would have been once an argument used against homosexuality.
In the 80's it was considered fact that homosexuality was a health risk. AIDs was a huge concern.
I don't argue that obesity isn't bad for you, but the issue is more complex, and I don't think it's right to stigmatize people for it.
Summary: Study at the height of the AIDS death rate found that homosexuality led to shortened lifespan. AIDS death rate has declined dramatically, but there has not been a followup study.
Here's a politifact analysis: https://www.politifact.com/virginia/statements/2012/jun/07/b...
More recently, a 2014 pro-LGBT study claimed to show a shortened lifespan, attributed to prejudice: https://www.medicaldaily.com/can-prejudice-kill-you-lesbian-... though this failed replication ("No effect found") https://www.sciencedirect.com/science/article/pii/S027795361...
This is untrue. You could say "it was considered by some/many/bigoted people" but I doubt it was ever true that the same percentage of people with relevant medical experience thought homosexuality was as unhealthy as obesity.
Even if it were true, it would be a straw man unless you were also claiming that all gay people had AIDS and/or it was impossible to have gay sex without contracting HIV.
All obese people are obese. Inside that bucket of the population, some people are genetically or culturally predisposed, but some significant portion of obese people are capable of making healthier choices and are failing to do so. I don't think it's right to go out of our way to make these people unhappy, but at the same time I think it's obviously better for everyone if society encourages these people to make healthier choices.
Regardless, unlike obesity, no one can remove their homosexuality and it is fairly insulting to suggest that.
If you want people to change, you have to show people not only that there are alternatives, and how to obtain the alternatives, but lastly -- and most importantly -- why they should strive for those alternatives. If you're just a dick to them, it doesn't help anyone.
Judging someone for being fat is about like judging someone for not being born rich. Eating and exercise habits are taught very young, and are very hard to change. It's very rare you see someone who is obese who wasn't put on that path by their parents.
Rather than make disparaging comments, I'm sure you have a friend who you could invite out for a jog? Or over to your place for dinners once or twice a week? Not everyone has rewards wired in the same as you do, certainly if they are obese they know it and can do without your reminder, and likely they've struggled to lose the weight and just need a bit more support.
You can either judge, and feel smug, or choose to help a friend.