Despite being the closest planet to the Sun, Mercury hosts water ice at its poles. Now scientists may know how it got there.