I suspect the truth is a bit more round about. That is, while sugar may indeed be to blame, it is because the gut bacteria that prosper most on sugar is a genus called enterobacter, whose toxin *causes* weight gain directly.
That is, if you had a better combination of gut bacteria, you could eat a lot more sugar without ill effects, your metabolism adjusting to it, except you would make your gut environment such that it favored enterobacter.
It has been shown in recent experiments that morbidly obese people had, instead of 30-40 primary dominant types of gut bacteria, almost 1/3rd of their gut bacteria was enterobacter. And when enterobacter toxin was injected into mice they bloated up in short order on the same diet.
Then they took morbidly obese people and put them on an anti-enterobacter diet, with *no* exercise, and they shed about 1/3rd of their overweight with no decrease in total calories.
What is an anti-enterobacter diet?