I think some people do have a genetic predisposition to obesity. My aunt, for instance, and my sister, have the same heavy build, and have never been successful losing much weight, even with long-term good
diet and exercise.
I don't think that I have inherited that same predisposition, despite the fact that I've been 70+
pounds heavier than I am right now not just once, but twice. Lack of genetic predisposition makes it easy for me to lose. And the gaining is all mental, not physical.