This has generally been treated as a lifestyle issue, but another possibility gaining traction is that "obesity" is a disease in itself, one that tricks your organism is seeking to maintain excessive weight, by impacting your appetite, BMR, exercise habits etc; this will of course usually make people suffering from "obesity" (for lack of a better name) over-weight, but the weight can be controlled without curing the disease. Basically losing weight doesn't cure your "obesity", just like when you suffer of diabetes, controlling your diet keeps you healthy without curing your diabetes.
The possible causes of this "obesity" disease could well be diet related, and definitely refined sugars seem to be at least a major culprit.
NOTE: Before someone points it out, this is NOT incompatible with my parent comment. Going on a 500 cal/day cut and losing say 8 lbs will not lower your caloric baseline all that much, so temporary more or less works fine. If you use the same method to dump 40 lbs, you will need to readjust your baseline when done or you absolutely will gain it back as your caloric intake needs have been meaningfully reduced.
The deficit cant be too large, for me 500 is ok, but 1000 has me ravenous the next day.
Lots of obese people easily lose 2 pounds/week but as you get closer to a healthy weight it gets harder.
CICO was the first time I was able to actively lose weight in my entire life.