Most fat people who lose weight gain it back because their preferred lifestyle involves consuming enough calories to keep them fat.
Most fat people who decide to lose weight do so through means that are totally unsustainable for the long haul. They do punitive levels of calorie restriction, or rely on gimmicks such as shakes or juice "fasts," or live on cabbage soup. Or, if they do pick something that actually works and isn't insane, and doesn't leave them starving all the time (such as low carb/keto), they go right back to their old habits once the weight's off.
No matter what they do to lose weight, they eventually drift right back into the way of eating that got them fat in the first place. Maintaining significant weight loss is a mental game (how you think about food) before it becomes a physical one (what you actually eat), and fat people who regain all fail at the mental game, partly because they aren't even aware it exists.
And yeah, it's hard to completely and permanently re-shape one's eating habits, especially when everyone around you continues to eat in a way that you no longer can--not if you're going to keep the weight off. Nobody else is going to hold the line for you, and make it easy to say no to shit you know you shouldn't eat. Very few people have the will to say "No," and consistently make it stick in the face of social and familial expectations around food. And if someone's addicted to specific kinds of high-reward, high-calorie foods, and knows they need to avoid them, there's no support for them--as there would be for a sober alcoholic--because nobody takes food addiction seriously.
Losing huge amounts of weight takes a lot of willpower and self-discipline, but keeping it off takes even more--and the need for it never stops. While dieting, there's always a short-term end point in mind (even if it's not yet in sight), and that can keep people motivated not to eat the goddamned donut. With maintenance, however, it's open-ended; there's no clear point after which you know you'll be able to relax and be less vigilant (except maybe when you're dead). And humans generally suck at thinking toward the hazy long-term; they're short-term goal-focused.
So unless someone comes to fully understand that, and accepts that being conscious of everything they choose to eat must be part of their life if they want to keep the weight off, they're going to slide back into old habits, because it's just so fucking
easy to do so.
That said, the people who do finally get it, and keep the weight off, usually had to go through many, many cycles of weight loss and regain before that finally clicked. So yeah, they had a lot of failures--but failure is an important means for learning what
does work Telling people they shouldn't even bother attempting weight loss because there is zero possibility for long-term maintenance essentially tells them there is nothing to be learned from experience, so don't even bother. And for those people--those despicable crabs in buckets--I haven't got enough "Fuck you" to convey my loathing.