Most exercise does not burn the number of calories people expect. For example, running a 5K doesn't quite burn the calories of a single Big Mac. If you think "I am exercising so I can eat a little bit more" it's very easy to eat more calories than burned.
Exercise because exercise is good for you. Try to eat fewer calories if overweight because that's good for you. It's best to treat these as separate problems: don't expect exercise to help you lose your weight.