Exercise is important, for the basic reason that our bodies are supposed to move. But I've read that weight loss depends much more on food intake than on working out. Even some personal trainers agree.
I have a friend whose weight ruined her knee and caused her to have a replacement 30 years before her time. She's really good about going to the gym and hiking, but she just can't moderate what she eats. So despite years of exercising, she can't lose weight.