This is true to an extent and I'm very fond of the saying, but beyond a certain point you can indeed outrun a bad diet. 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 un…
Yep, at one point in my life I was consistently cycling for 30 hours a week and eating enough became a chore. So it's definitely possible, but it requires enough exercise that's essentially a full time job.
My conclusion was that past a certain point you need to use liquid sugar (soda especially) to get your body to put on weight past a certain point.
Even with absurd amounts of fat, carbs and proteins I could not process enough food to put on the weight I wanted too. Sugar is the backbone of massive weight gain.