Not all calories are the same; in fact the quality of the calories determines the quantity your body burns or stores. There could be two products with same amount of calories but not the same quality, which will affect your weight and your health.
Calories in fiber can help you delay the absorption of calories, some calories are also delivered to your intestine, where your bacteria burns them for their own energy source.
When you are metabolizing protein your body uses twice the energy than it does for carbohydrates, this is because of the thermic effect of food. Protein also helps you reduce hunger hormones, so your calorie consumption will be less.
Calories in carbohydrates such as starches contain mainly glucose, which every cell of the body uses for energy, on the contrary fructose, found in processed foods, sugary products and sodas, is metabolized as fat in your liver, leading to chronic diseases and diabetes.
Choose your calories wisely. It could be the same amount, but that does not mean your body will process them equally.