Is it for everyone? Perhaps not. But to outright unequivocally say it's not is simply outright incorrect.
It was absolutely motivation and discipline for me. One day I just decided enough was enough and I threw the proverbial kitchen sink at it.
I am perhaps an outlier in that I'm not ashamed to say I was obese in the past because I simply lacked the motivation and desire to do the work to change it. It was easier and more comfortable being fat than in shape.
I definitely agree telling an obese person to eat less and move more is about as useful as telling a depressed person to just stop being depressed. But lets not make outlandish claims either.