People might stop caring quite as much about individual pricing once they have enough money not to have to care.
People who have to worry "can I afford all of this once I get to the till" are very aware of how much everything costs, and they are more common than people who don't have to worry.
"Gallons" are not a universal metric:
For the US, 1 Liter of milk = 0.2641720524 (US) Gallons.
For the UK, 1 Liter of milk = 0.2199692483 (UK) Gallons.
Because this has been and still is confusing, the standard unit of liter was introduced as a universal alternative (no flamebait intended).
If you are poor and/or live paycheck to paycheck (for example due to your monthly home heating bills having gone from 400 euros to 3000 euros year over year), I can guarantee you, you pay very close attention to how much food costs.