It evaporated and floated into the upper atmosphere, where solar ultraviolet light tended to break up the water vapor molecules into hydrogen and oxygen. The hydrogen was swept into space by solar wind. The oxygen combined with carbon to become Mars' current CO2 atmosphere, and with any exposed iron in the soil to produce rust (which is why Mars looks so red)
Why ?
Why didn't it just stay there ?