Answer :
Because an amount of the said substance emits a specific amount of heat.
In food usually calories are measured per 100 grams.
For biomolecules calories are measured per 1g (e.g. 1g glucose=4.1kcal)
We calculate calories per gram instead because the amout of a certain substance emits a limited amount of heat.✅