Not sure if this is a bug or an oversight, but usually when there are more than one servings of something we have the option to "pick up a serving" which will make the sim put a serving of the food in their inventory and not eat it.
However if I make multiple of cotton candy or the lollypops there is no such option, just "grab a serving" which will make the sim eat that serving (even if I cancel quickly, they will still take a bite). Since I want to sell that candy I obviously do not want them to eat it.
Btw even if I only make one at a time it doesnt work cause they will automatically start eating it when its finished.