The laws of thermodynamics.
Heat always moves to cold.
Water vapor always moves to cold.
The water vapor in your home and/or attic, is created in your home by cooking, washing, breathing and sweating.
Active children and animals create most, old inactive people less.
This water vapor is held in the air until it comes into contact with a cold surface, or colder air.
When this happens the water vapor drops out as condensation, this you see on windows during the winter, but more dangerous it happens inside walls and the attic, where it condenses onto/into the cold wood leading to mold and wood rot.
The old idea that ventilation stops condensation has been discredited, as ventilation relies on the passing wind to create an area of low pressure to the lee of a building, this low pressure is supposed to pull the humid air from the attic and release it into the cold outside.
In fact what happens is the low pressure pulls the warm wet air from the home into the attic, then the wind stops and the wet air condenses.
More than that, the low pressure pulls your expensive warm air out and pulls in cold air that pushes up your heating costs.
Modern building, see Passive house standard. Enclose the living area in a plastic insulated air tight box, with at least 20mm of polystyrene insulation against the cold side of the plastic to stop condensation by keeping the plastic warm.
You can stop condensation, by opening windows in the winter to let the water vapor out, by keeping the heating at a steady temperature (not turning it down or off) or using a de humidifier, or by painting the ceilings with gloss paint or latex or lining them with plastic to stop the water vapor entering the attic.
Condensation never forms on a warm surface.