It doesn't always. But more dense foods tend to be higher in calories. This is usually because there is more food. For example, less-dense foods tend to be airy or very watery (think apples, for instance). Something like corn bread is thicker and mroe dense. With less air or water (both no calories) to take up space, you get more food per cubic unit that you do for less dense foods. More food = more calories.