Diet and lifestyle certainly play a large role, but that's no reason to ignore the possibility that other factors that might also be at work, and body fat is regulated by a lot of signaling mechanisms.
This is exactly why I said that, while it's probably not realistic for an obese person to be able to get to single digit bodyfat, but they *can* work to get themselves to a more normal range.
Example, a man who is 300lbs most likely only has around 180lbs worth of other mass, like muscle and bone, etc etc. So that means he is carrying 220lbs of useless fat. That's a lot.
Bodyfat wise, that guy is 73% bodyfat. To get down to 30% bodyfat, he has to lose about 70lbs, which would get him to 230lbs, and around 30% bf. While not a stellar weight, the difference in look and health will be night and day. The only diseases I know that would make this extremely difficult are problems with the thyroid. If the person has a faulty metabolism, the body won't be able to burn off a salad, but at this stage such a person should be seeking medical help.