Its 160 grams of sugar which equals 619 calories which leads to 12999 calories in 21 days. Still less than 4 pounds though.
However, you're really oversimplifying weight gain. Hormones play an important role in how much fat is stored and how much your metabolism burns. And the type of food you eat can affect your hormones.
You're talking about that 13k calories of sugar as if it exists in a vacuum. That extra sugar could have caused more of the other non-sugar food he was consuming to turn to fat.
Its not coming from nothing. If a higher percentage of the total calories he consumes turns to fat instead of being used as energy, then he will have extra mass on his body.
I dont think thats the central message of the film at all. the problem with human digestive system is that it evolved for very different set of conditions & has very limited 'floating' capacity for carbs. so when you eat highly processed food with short chain carbs what you get is sudden overload in carrying capacity of blood stream. body responds by storing it away as fat. OTOH when you are short on energy body produces hunger signals before tapping into fat reserves so eat again & cycle repeats. the message IMO is about composition of what you eat (centered around sugar).
However, you're really oversimplifying weight gain. Hormones play an important role in how much fat is stored and how much your metabolism burns. And the type of food you eat can affect your hormones.