Basically, if you have the technology to support human life on Mars, you have the technology to disaster-proof Earth.
And that's to say nothing about the ability to launch spacecraft from a lower gravity and/or using a magnetic rail. One could even turn the asteroid into dust (which is less dangerous than a ferrous mountain falling from the sky) with a kinetic impactor packing enough energy.
The very distance that makes Mars so hard to reach would be good protection against such an unexpected event (whether it's unintended effects of scientific experiments, novel WMDs, grey goo etc.). There is no way to create a similarly isolated colony on Earth, even if we discount the problem that nobody would want to live in such a place. (As opposed to the many people, reared on SciFi, who would volunteer for Mars quite eagerly.)
On the Moon, solar energy is abundant (close to the Sun, no atmosphere) and so are the metals used in spacecraft construction. Without atmosphere and with a low gravity, launching cargo to Mars is easier and can be done with a magnetic rail launcher, effectively using solar power to launch a spacecraft to Mars.
I's even greener to go for the Moon first ;-)
A self-sufficient colony on the Moon would be efficient insurance against most disasters I can imagine and much easier to build. A colony on Mars offers negligible benefit over one on the Moon for the purpose you mention.
You, me, and the original poster agree: it's cheap compared to the potential downside.
Now, go try and tell guys with actual money about this, see if you walk away with the bucks for a Mars-based insurance policy.