Mars changed from a blue world with water to a red desert because its atmosphere escaped into space over billions of years.