All calories are created equal
If I hear "a calorie is a calorie" one more time, I will lose my mind. If you honestly think a calorie of broccoli is the same for your body as a calorie of candy, you are sadly mistaken. Consuming 2,000 calories of highly processed, low-quality foods is going to fundamentally screw you up more than consuming 2,000 calories of lean protein, fruits, and vegetables.
To think about it another way, when you say "a calorie is a calorie," it's like saying a pound of muscle is the same as a pound of fat. Sure, they weigh the same, but their functions in your body are completely different.
Low-quality calories -- think simple sugars from sodas, candy, highly processed carbohydrates, and the like -- provide a fast-acting form of energy that spikes blood sugar and can throw insulin levels out of whack. Highly processed foods don't offer much in the way of nutrient density, either, and if you subsist on sugar and simple carbs, you're risking heart disease, diabetes, and more.