The price of sugar or chocolate can vary, but the confectioner can mask that by slowly shrinking the size of the chocolate bar so people can feel like they're spending the same amount for a chocolate bar but the actual amount they get is less.
NPR: The Peculiar Role of Gasoline in Consumers' Lives