Most people when they say they want to lose "weight" meant they want to lose "fat" and improve body composition.
Focusing solely on calories in / calories out omits any effects hormones have on fat burning / storage.
In your scenario - yes - if someone drank 2000 calories of coke and that's it, they might not get "fatter", but that's not how real life works.
99/100 times, that person who drank 2000 calories of coke is going to be starving shortly afterwards and isn't going to simply "fast" and let lipolysis take place. Instead, because sugar causes ridiculous cravings - they're probably going to crack and down another 1,000 calories of another carb intensive, sugary food ('cause cravings) until their calorie intake exceeds their calories used and their hormone levels are thoroughly trashed.
I like hypothetical scenarios as much as the next guy, but focusing strictly on calories in / calories out and ignoring hormone imbalances, cravings and other real-life factors are typically symptoms of someone who reads lots of books, but hasn't has too many real life case studies to work with.