Calorie expenditure is based on power. You wattage output is the actual amount of energy expended during a ride, while heart rate is the by-product of the energy produced.
To calculate the calories burned, FulGaz makes some wattage based calculations and assumptions, as the human body is only about 20% efficient. When you ride, you are also losing energy in heat and to the simple metabolic cost of breathing, plus many other processes we need to do to stay alive.
There is a lot of established science to calculate energy in vs wattage out. Our calculations take into account the findings of several leading studies in this field to work out calories expended.
While this data is recorded in the FIT file (and synced to third-party connected sites) you may notice a difference in the total calorie number on other sites, such as Garmin Connect or Strava. This is because each site uses it's own calculations for energy expenditure.