Potentially a combination of things. Education and reinforcement, discipline, opportunities, etc. All would surely help. On the last item, at a servo (what an Australian generally calls a "gas station") soft drinks and energy drinks are often cheaper than water or promoted in two-for-one deals. They're also always at eye level, leaving milk and water on lower shelves of the display fridges.
When you reach the counter (and the same thing happens near supermarket checkouts), there is literally shelving with hundreds of chocolate bars between you and the attendant.
And this is where you're filling the car that enables you to avoid walking a distance instead.
Another opportunity example is fast food. The 24-hour shops will be Hungry Jacks (Burger King in AU), McDonalds and so on, or servos. Supermarkets will generally have shut by 9pm.