I used to spend ~4 hours a day training martial arts (kickboxing, BJJ, etc) during which time I could eat almost anything I wanted without gaining weight.
I'm sure if I had downed a cheesecake a day it would've been bad for me, but I was able to get away with a level of excess back then that I am unable to today.
So you can indeed outrun a bad diet, it just takes more running than most people want to do!