In brief
Different package sizes can hide which product is actually worth less per unit.
Useful to know
The unit price compares similar products on an equal basis, for example price per kilogram. Iowa State uses this approach for packages of different sizes and different shapes of a food. [1]
Conditional example: a package of 500 g for 2.40 euros costs 4.80 euros per kilogram. A package of 750 g for 3.30 euros costs 4.40 euros per kilogram. The bill is a price divided by the table in kilograms. The numbers are indicative and do not describe current store prices.
A lower unit price doesn't solve everything. If you're only going to use a small part, the large package could leave a waste. Compare the condition of the product: a whole vegetable, a cleaned product and a finished portion do not require equal work. In cans, specify whether you use the total or drained weight instead of mixing the two bases.
Sources
For further detail and to check the information: