I am not an expert, but what I have read is that due to Mar’s weaker gravitational force and limited atmosphere, any surface water escaped into space.
How was it originally 'attracted' there...the gravitational force hasn't changed?
Asteroids & comets?