Many reasons. Imagine i instruct two identical people to lose weight, telling one to only do so through dieting and the other to only do so through exercise. Both return 6 months later, both have lost 20 lbs. The "dieter" is only slightly healthier; the "exerciser" is vastly healthier because she now has a stronger heart, improved blood pressure, better cholesterol, better mental status, etc. No comparison.
It's not. If weight loss is your goal, then both are important. Exercise including cardiovascular and strength training is just as important as changes to your diet. "dieting", where you starve yourself or jump from one fad to another is not very helpful for sustainable long term changes, but if you are not seeing results from you exercise regimen, then look to your diet and make changes.