In my personal experience, both exercise and diet are good for weight loss, but I think people tend to underestimate the amount of exercise necessary to really contribute significantly to weight loss. More than that, people who aren't in great shape aren't in good enough shape to exercise enough for it to really make much difference. Jogging 3 miles a few times a week will help get you in shape in the sense of making jogging 3 miles easier, and eventually being able to go faster and farther, but it doesn't increase calorie burn by all that much until you start increasing the miles/speed/frequency by a bit. Then eventually you get in good enough shape to increase your base metabolism, which persists for a bit even if you go through a lazy stage.
Importantly, of course, is aside from being hard (especially when you first start), that kind of exercise is very time consuming. Also recognize this analysis is for relatively young relatively healthy people without any mobility impediments.