Possibly because the supermarkets are using various techniques to persuade you to buy more things. For example, positioning essential items at the back of the store so you have to walk past other things that you might not need to get to what you actually want - with the added possibility that you'll see something else on the way. The background muzak and smells piped into the store (such as freshly baked bread) can also have an effect. The best way to avoid spending more than you intend is probably just to be wise to what the supermarkets are doing - and don't shop for food when you're hungry!