There's no reason all bodies form with water as a component, but that's the conventional bias. Also, the presence or absence of a magnetic field has nothing to do with the retention of atmosphere or water. Lastly, the Moon used to have a magnetic field, or formed in the presence of a magnetic field stronger than that of the Earth's.
I was responding to Comment #18, and accidentally wrote Moon instead of Mars. So my contention was that magnetic field had nothing to do with lack of water and air on Mars, it was because of escape velocity.