Well, knowing what absolute shit "junk food" is--calories (empty calories), chemical consequences, etc. really helps. It's more shock-and-horror that really helps keep me from falling into some junkfood hole. Nutrition was key in helping me conquer mental illness so I'm intimately aware of how detrimental crap food is.
Also, flushing sugar and shit like out of your system that helps reset your appetite so you won't feel so drawn towards junk food. Sugar is poison that makes you crave more. I mean, I love sugar, but I know what it's all about. You see it in your skin, feel it in your bones, headaches, attitude, frustration... it's a good thing to get out of your body every now and then.