I think the standard view is that Mars’ core cooled down and largely solidified, thus cutting off its magnetic field (which could then no longer protect the planet’s atmosphere from the solar wind and cosmic rays). Hasn’t happened on Earth yet, because Earth is quite a bit larger and its core is still molten.
I’ve read that it’s radioactive decay that keeps earth’s core hot.
non standard view is that the sun had a kill shot which took up Phaeton. The kill shot screwed up Mars orbit and everyone fled to earth.