That doesn't make exercise ineffective. If you keep your diet exactly the same but start/increase exercise, you will lose weight and get in better shape.
You will lose weight, but it will be extremely slow and hard. Changing your diet is far more efficient and easier to control.
If you are at a steady weight and go from no exercise to moderate exercise 3x a week, you'll burn about an extra 1,500 calories per week. You'll lose weight if you stick with it every week, but it will be a slow process that's hard to manage because you'll also have an increased appetite after working out and a lot of people eat those calories back because they dont understand the importance of proper nutrition.
You can get that same result with the most minor of dietary changes. If you incorporate more vegetables and less processed/fast foods into your diet, you'll far exceed those 1,500 calories per week in a healthy way. Rarely do people jump off of the couch and get into the gym at a vigorous pace 3 times a week and stick with it. It takes more additional time than dieting, you get sore, and many people need external motivation.
Nobody is saying that exercise is bad or not important. But, if your goal is strictly weight loss, it is not the efficient way to do it.