Mars is just a fraction the size of the Earth, so it cooled more rapidly. And as it cooled, its molten iron core hardened. As a result, Mars stopped generating its magnetic shield. And, according to one theory, this left its atmosphere to be scoured away by the solar wind.