Good question, which goes into the heart of the definition of GDP.
The answer is that some of the value of the drink is accounted irrespective of what the seller does with the drink. Recall that GDP accounts for the value added of final goods, value which is "added" at each stage of production (and equivalent to the final price of the good).
As such, when the retailer buys the can of coke from the wholesaler or producer, a portion of the total value has already been recorded in GDP. It is only the value added by the retailer which is not counted if the seller drinks the coke.
Naturally, this is true only if the seller does not sell the coke to herself. Otherwise it makes no difference at all.