Mars’s magnetic field protected it from the Sun for all that time, allowing rivers and sediment buildup and hydrogeologic processes to take place. It was only because of its small size, which caused it to cool fast, lose its magnetic protection, and then its atmosphere, that it eventually became uninhabitable
source
28yrs Nasa as been looking for life, never once have they searched Martian icecaps for extremophiles.