Largely it's about viewing food in the wrong way.
People generally eat food because they're hungry. Now and again they might go to a restaurant or something for a treat, but they have other ways to "treat" themselves as well, so the focus is primarily on food just being sustenance.
In many cases though, obese people have a different view of food. They see it not only as sustenance, but as something to cheer themselves up with when they feel down, for something to do (eat) when they feel bored, for something to turn to when they're sad, for something to have when they're celebrating... it's so much more than just basic nutrition.
And unfortunately for many very overweight people, they enjoy the taste of unhealthy junk food far more than they enjoy the taste of salad!
So the weight starts to pile on, but they avoid the scales, knowing that their clothes are getting tighter but turning a blind eye to it, and just buy larger clothes instead, with excuses about how they need a new outfit for such-and-such an occasion, or excuses about generally needing more clothes, when really they had enough clothes in the first place it's just that they don't fit into them any more.
Once the cycle of eating and generally being in denial about it sets in, the person gets heavier, and the more weight they put on the harder they find it becomes to exercise. It's all very well and good telling people to move more, but if you're 30-odd stone, simply walking from one room to the next gives you extreme back pain, leg pain, and sets your heart racing so much that you're terrified you're going to have a heart attack. Is it any wonder then that they scoff at people who say to them ridiculous things like "get off the couch and go for a jog." Yeah sure that's fine for somebody who is moderately overweight, but in many cases people just let the weight creep on, and by the time they realise how much they've gained, they're at the stage where they simply CANNOT "just go for a jog." Literally they can't, it would kill them.
So then they're in the unfortunate position of not knowing how to lose weight. Their attitude to food is still all wrong, but even if they manage to get their heads in the right frame of mind of viewing food as sustenance rather than food being seen almost as a friend, if they suddenly go on a low calorie diet they simply won't stick to it because their stomach is so severely stretched that they literally feel starving. Not just hungry, but so hungry that it physically hurts. Not many people could stick with that sort of feeling for long. And to top it all off they really can't just go jogging, they can't even get off a chair! So you could suggest to them that they do small 'chair exercises' - lifting their legs up one by one, or pumping their arms in the air, for example, and they might do that, but it'll be so frustrating for them because it'll seem like a rubbish excuse for an exercise, and the weight loss results won't be particularly fast, and of course ultimately then they'll get so upset with themselves that they'll end up turning back to food for comfort.
It's a vicious cycle, and sometimes people do genuinely want to lose the weight, they just have no idea where to start and feel helpless about it.
Really unless you've been morbidly obese, or known anybody who is morbidly obese, it's not the kind of thing you can easily analyse without being critical. Sure they did it to themselves in the first place, but then again anorexics are the same, only opposite. It starts with the wrong attitude towards food.