Because it is trying to heat or air-condition the outdoors as well as the indoors. Radiation - the passage of energy through open space, like sunlight. In the winter, during the daytime a building absorbs solar radiation, but after the sun goes down, it starts to re-radiate heat to the cold outside air unless something is done to block the radiation. In the summer, efforts have to be made to block solar radiated heat from entering the house. Conduction - the passage of heat through a material.
Insulation helps to block conduction of heat.
If ceilings and walls are poorly insulated, they conduct heat from the house to the outside. Convection - the transfer of heat by movement of air. In the winter, as heated air contacts cold surfaces such as windows, it loses heat. The cooled air is denser than warm air, so it tends to settle, pushing warm air toward the ceiling. These temperature changes and air movements form a pattern.