Tiny bits of Earth’s atmosphere have been drifting to the moon for billions of years, guided by Earth’s magnetic field.