Your kid comes home, and you greet him. Then you tell him to stay put because you need to clean his shoes, so you leave. He sees those cookies waiting there. He smells the sweet aroma. And you're not there. Guess what he does next? He eats those cookies (and makes a mess doing it), which you already know.
You may have laughed a little when imagining this scenario because you recognize how universal this kid's action is. You also recognize the human nature underlying it, and in this may you see the kid as a caricature of us adults.
Yes, you and I, logical adults with big frontal brains that help us control our impulses and direct our behavior (so we think), guess what would we would do in a similar scenario, when coming home from work, hungry, and see crap food sitting out in the open when we walk in? We will eat that crap food.
It's human nature. And importantly, we act on our impulses -- despite knowing we should not do this -- because our environment gave us a cue to act toward seeking the pleasure gained by eating this crap food.
Making habits is also human nature. Habits are routine behaviors we tend to do automatically, without thinking about what we're doing. Following habits is the easy thing to do, because if we had to think though every possible action every hour of every day, we would tax our brains too much, we would become overwhelmed, and end up doing nothing.
Our habits help us live, and our they largely center on cues available in our environment. For example, say you want to form a new habit of working out. And your gym is 30 minutes away. You probably will not make a habit of going to the gym regularly. It's too far, it's not in the immediate environment, and too much energy and motivation will be needed to make the action of going to the gym a habit.
But say if you move. Then your new gym is only a 2-minute walk away. You will probably make a habit of going to the gym all the time, because not only are you motivated (like you were before). Now the action is easy to do as it is only a short walk away. What I am trying to illustrate in this simple example is this: it is easier to form a habit when you change your environment to make it easier to do the action you're hoping to make a habit.
Same with the food we eat. If we keep junk food in the home and it is easy to see, then you will eat junk food. No matter how much you commit to eating healthy food, you will eat the junk food because you're environment is set up that way.
If you hide the junk food, but put the good food out so the eyes can see it, then you're far more likely to eat the good food and not the junk. More importantly, you're far more likely to make it a habit, because the cue in your environment is "Hey, here's some food." The food just happens to be good. And habits are important because it makes us who we are.
So don't do the hard thing. Don't try to make a new habit by keeping the old environment around you. If you have crap food out where it is easily grabable, then you'll have to think "Don't eat this" a lot, you'll strain your brain thinking about this even at a subconscious level, and you may give in to the crap food because there is only so much psychic energy to battle your desires. Trying to change your habits in the same old environment is like swimming upstream, which is hard work and sometimes impossible.
Swim downstream, not up. Do this. Move the crap food out of sight. Hide it in the darkest corner of your cupboard or closet. Or throw it away. Put some good food like nuts and fruits where the crap used to be, so your eyes can easily feast on it. It will make it much easier for you to follow through and start eating better, not just today, but tomorrow and for the future.
So the Healthy Indian regards this tip highly: Change your environment to help you make better habits, instead of trying to make better habits in the same old environment.