From what I understand...
As the air inside the headlight changes temperature, its ability to hold moisture changes which results in condensation.
It is much harder to vaporize water than it is to condense it, which is why it never goes away.
The vent keeps the pressure equalized so that the moisture never condenses.
Here is the vent on my headlights.