Dieting doesn't work, because it's all about short term goals. People have to make sustained lifestyles changes to lose or gain weight and that often mean relearning everything from childhood. My dad did a lot of the cooking in my household and typically he cooked low calorie meals so that's what I enjoy and what I feel I can handle. Other people were raised in households where their parents cooked high calorie meals or gave them high calorie snacks so thats what they understands. If I don't pay attention I'll lose 10 pounds without noticing even though I'm never hungry and eating whenever I want whereas they'll gain 10 without noticing. Now, consider this, you're overweight and you want to change your habits so you start researching and going to the gym. Except while you're doing this those people are complete assholes who are telling you you lack something and you are embarrassed to go to the gym because people stare or make fun. Fitting in with those people means hating yourself on top of trying to relearn everything you know about health. Why go through that when you can just stay the way you are with people who accept you instead of looking down on you ? This is the main reason accepting our bodies at any size became a thing and many personal trainers are pushing health/strength over looks at least in woman's fitness with a more positive attitude.
Nobody is saying sustained weight loss is impossible, and if you want to deny fat people get shamed at the gym then that's your thing but body shaming is a very real thing. You qualify this terrible thing of shaming as a fat person trying to lose weight, but you don't know anybodies weight loss goals unless you see them in the gym. So that person trying to lose weight may still get shamed outside of the gym because hey they're just fat. Body acceptance isn't about not changing your current body. It's about loving yourself and knowing your worth something. The negative attitude that comes from body shaming just leads to comfort eating