I can't think of any risk to humanity where going to the moon or Mars makes sense as insurance.
If we find out about it decades or centuries out. If it's a year out when we spot it, there's very little we can do with current technology to head it off (asteroid disaster movie plots notwithstanding).
> And if self sustaining is all you need, setting up a self-sustaining colony a mile underground is also five or six orders of magnitude cheaper.
It's also much more accessible by desperate refugees trying to get in as the planetary disaster approaches.
What makes SpaceX important is that they've rethought the design and manufacturing process to make their rockets far cheaper than others to date. If you bend the cost curve enough, surprising things become reasonable.
For comparison, the space station cost $150 billion 2010 dollars (according to Wikipedia). It is in low-earth orbit and satisfies no conditions of self-sustainability. With a factor of 100 on that, which is impossibly optimistic, you are already at $15 trillion.
That isn't true. There are no asteroids big enough to do that, that we haven't seen. The asteroid risk is a regional one, not a global one.
How exactly are you proving that negative?
There are plenty of undetected asteroids, and while they could cause damage they are not big enough to wipe out all life.
According to http://impact.ese.ic.ac.uk/cgi-bin/crater.cgi?dist=20000&... a 40km comet impacting the earth would destroy entire countries.
But on the other side of the earth, while it would be noticed, it would not kill anyone and it would not cause severe damage.
So deadly? Yes. but humanity destroying? No.