Why not? If a big asteroid is going to hit earth (for example), fleeing is a pretty reasonable response. It's also a reasonable defense against technobiological hazards.
To compare, the Triassic–Jurassic extinction event created an Earth still more liveable than Mars. Even if we go way back in time, to when there was no land-life on Earth and a poorly oxygenated atmosphere, the Earth is still better off than Mars for supporting human life.
If the goal is to save the human race, then it'd be better to have a few high orbit or lunar habitats, then if something wipes out the majority of civilisation on Earth, we immediately begin recolonisation of our home planet.
Because that's basically what this sort of thing comes down to, at the end of it. There's basically nothing that is going to be existentially, immediately threatening to earth on a timescale that Mars is actually a more livable environment.
Where else in the Solar System could we even get the amount of water we would need?