In a perfect world, you could grab a pizza on the way home from your workout followed by a big bowl of ice cream, and still lose weight. But in the real world, that is not likely to happen.
Weight loss is largely a matter of calories out versus calories in, and not being careful with your diet will lead to a calorie surplus and weight gain.
You could create a calorie deficit by only dieting or only exercising, but it would be very difficult to maintain. That’s why the combination of diet and exercise is so important. That way cutting calories doesn’t just depend on one variable. If you happen to miss a workout or two, you can adjust your calorie intake to make up for it and stay on track.
Weight loss isn’t the only thing that should concern you. Eating a lot of junk food, or even overeating foods that are good for you in small amounts, can have negative effects on your health. Eating too much sugar not only leads to obesity, but it also causes diabetes. And then there’s the risk of not getting the nutrients you need for good health if your diet is primarily composed of junk foods.
If you plan to exercise a lot, you’re going to need sustained energy, of which junk foods are a poor source. Complex carbohydrates, lean protein and healthy fats will provide lasting energy, and they’ll also provide raw materials for protein building and for recovery so you can get to the gym and reach your goals.