At a grander level, this is what Elon Musk, SpaceX, and other related endeavors are all about.
Humans are terrible at considering and planning for large-scale, exponential, and extinction-level events ala pandemics, nuclear holocaust, and the long term effects of climate change.
The only real way to ensure that we don't drive ourselves extinct as a society (either purposefully or accidentally) is to create a backup copy of society, just like you would do for any other extremely valuable piece of information.
Onward to Mars!