The process of turning fermentation only uses some 6% of the potential energy in sugar, so the calorie difference between the wort and the final beer is pretty small. On the other hand, alcohol has a much higher calorie density than sugar because while the fermentation released little energy, the CO2 produced is nearly half the weight of the original sugar - several pounds of CO2 go out the airlock when making a big beer. This means that the alcohol left behind is a much more energy-dense material: it also means that beer is markedly lighter than the original wort, which is how it loses SG while not expanding appreciably.