Why stars come out at night