Exercise helps people to lose weight. Just go to a local group bike ride. Then first observe average BMI there and then talk to people and you will find out a lot of them started fat. The problem is that people delude themselves about calories - both burnt and eaten. For example riding a bike at somewhat brisk but sustainable (for a healthy average man) pace may burn 500kcal per hour (that would be around 140W). Similarly running or walking for 7km as 70kg person burns around 500kcal. You do it 7 days a week and you still can't really eat more than your baseline if you want to lose weight. We can argue if 7 hours a week is a lot of exercise or not but most people would feel they exercise a lot and use that as justification to eat more.
The problem is that we are so sedentary that a very mild volume of exercise like 7 hours a week (let alone things like going to the gym 4 days a week) is seen as "very active lifestyle" and used as license to eat a lot.
Unfortunately you're still sedentary if you do that and sit at the desk, drive a car or lie on a sofa for the rest of the day.
It's not like adding more exercise is bad. It's the fact people are sedentary, drive everywhere that it's not feasible for them to get to activity level to really make a dent. Imagine you have to walk to your office for 30 minutes every day (and then back) then walk to a store to buy food. Then do some sports on top of that and suddenly the amount of food you can eat changes drastically.
Unfortunately it's very hard to do in today's world. We even started SUV'ing children to school instead of letting them walk. No wonder almost everyone is getting fat and complains that "no amount of exercise makes a difference".
When I look at photos of my parents in their 20s I struggle to see any fat people. Almost no one had a car back then (in my country) and that needed to walk a lot just to get to school/job, buy food, get anything done around the town (no online forms back then). People usually attribute it to food availability but when I try to estimate how much they needed to walk every day I see a completely different picture.