Earth remains more habitable than Mars even following staggeringly large asteroid impacts. As evidence, note that 25% of species on earth
survived Chicxulub; those species would not have survived transportation to Mars.
And humans are well situated to be one of the survivors of a future large impact, by virtue of our tendency to burrow in the ground and to cache food. Indeed, one silver lining of the cold war is that major powers spent tremendous sums of money building fortifications with independent power and life support, as well as substantial food stockpiles, as well as numerous nuclear submarines which would weather the impact.
Another Chicxulub might kill 8 billion people, and would be an immense humanitarian tragedy -- putting people on Mars won't save us from that. But we have the technology for survivors to ride it out today.