Why do they gain the weight back though? I'd hazard a guess they stop the calorie restriction and go back to their old habits.

Short term "diets" are nonsense. The solution is permanent lifestyle changes.