The one thing that's not been mentioned: the size of the package needs to be something easily shipped. A standard pallet in the U.S. is 48" by 40" (not sure about Europe, but I'm sure they have a similar standard). While boxes can overhang the 40" side a bit, it shouldn't be by more than a few inches, and they certainly shouldn't overhang the 48" side, or the forklift/pallet jack won't be able to operate safely.
Say your food came in boxes 20" by 10" by 4" - so you can fit say 8 on a pallet row. This is a chocolate bar, say 4" by 2.5" by 0.5", which works out to 4oz. So you can fit 5 deep 4 across and 8 high- total of 160 bars per case. Great.
Now you want to shrink the bar by around 25% (so to around 3 oz). But a 3" by 2.5" by 0.5" bar now won't fit neatly in a 20" by 10" box - you'd have 2" extra the long way. That's bad news all around. So you make it 4" by 2" by 0.5", which fits nicely (5 deep 5 across 8 high, 200 boxes/case), but isn't quite a 25% reduction in volume per bar - so it's now 3.2oz. Well, okay, make it 0.4" high - okay, now 5x5x10 or 250 per case, fantastic, a bit more than 25% reduction though, now it's 2.56oz...
Of course you could switch box sizes, but in some case you can't really do that - either because the company is a smaller company with a more limited box size choice (and perhaps a ton of pre-printed customized boxes they don't want to toss), or because of some other restrictions. Very large items particularly have this problem. As such, sometimes sizes are chosen for volume-to-ship criteria rather than just round-number-on-box.