Andromeda is right about the assumptions people make when they see someone who is overweight. They assume it is lifestyle without even asking what your lifestyle is.
Recently, my doctor said that I needed to increase my exercise and almost apologetically asked if I thought I could manage 150 mins a week of aerobic exercise. I said to him that I swim most days anyway, and he looked a bit sceptical until I told him that I swim a kilometre in each session, so I already do at least what he suggested. He looked a bit taken aback then. I also eat healthy meals that are all cooked from scratch. The doc didn't even get onto the diet when I said that. He just said go and see the diabetes nurse. I blame the years of work stress and now that I am slowly coming out of that mind set, the weight is equally slowly disappearing. But at least it is heading in the right direction.
I do think that swimming is a good exercise for weight loss. Aside of the physical activity, you use a lot of energy to keep warm when you are in the water. And if you have joint pain or mobility issues, your weight is supported, so you are less prone to injury.
I got a discounted gym membership rate from the last company that I worked for and I continue to benefit from that. I get my money's worth from using the pool and the weight machines.