You are being scammed by Corporate America
For the past few decades, companies like Coca-Cola and Pepsi Co. have promoted the belief that, if you exercise enough, you can drink as many sodas as you want. This message is highly misleading and a ploy to deflect criticism about the role of sugary drinks on the obesity and Type 2 diabetes epidemics facing the United States. In fact, a 2011 meta-analysis [1] found that, after bias-adjustment, there is “no association between physical activity and fat mass [that] could be quantitatively synthesized.”

No, Coke, you cannot exercise away a bad diet. Even if you throw money at it.
In 2015, Coke paid over $1.5 million for research to the Global Energy Balance Network (GEBN), a self-proclaimed “public-private, not-for-profit organization” that argues that a bad diet is not the cause of obesity. Critics called it a soda-industry front group that funds scientists to shift the blame for obesity away from diet and onto lack of exercise. A massive uproar followed the discovery of these payments. This debacle led to the returning of a $1 million “gift”, retiring of Coke’s chief science and health office, Rhona S. Applebaum, and the shutting down of GEBN citing “resource limitation.”
So, I’m sorry, Coke, but you cannot exercise away a bad diet. In fact, evidence from Harvard’s Chan School of Public Health indicates that sugar drinks are a major contributor to the obesity epidemic. And this isn’t restricted to just sugary drinks. The calories you consume are an important determinant of your weight.
While exercise is important for health, watching your diet is the key to weight loss.
Here’s how your body works: Weight gain or loss is determined by two factors only: Calories in and Calories out.
Calories in: Includes food and drink consumption. This is the number you can find on the nutrition labels of packaged food/drink items.
Calories out: Includes (1) basal metabolism (60-75% of energy expenditure), (2) physical activity (15-30%), (3) thermic effect of food (~10%).
Basically, you control 100% of your calories in but only 15-30% of your calories out.
Be smart about what you put into your body. It’s more important and impactful for your health. Here’s some logical thinking to help you out:

Can you imagine?? You would have to run for over 25 minutes to burn off a single slice of pizza.
Important Disclaimer: I’m not suggesting that eating pizza is bad for you. I’m also not suggesting that you shouldn’t eat pizza (or ice cream or any other food you love). This demonstration only tries to point out that controlling calories consumed is easier than controlling calories spent.
Finally, exercise is important too. Apart from quitting smoking, it’s the most beneficial activity you can do to become healthier. But, keep in mind, if weight loss is your goal, controlling diet is way more important.
References:
(1) Wilks, D.C., et al. Objectively Measured Physical Activity and Fat Mass in Children: A Bias-Adjusted Meta-Analysis of Prospective Studies. PLoS One. 2011. 6(2): e17205.