Human psychology is extremely relevant here.
We could build a self-sustaining underground colony on Earth that's powered by nuclear reactors and which grows its own food hydroponically. It could probably survive a dinosaur-killer asteroid event. And as you mentioned, it would cost way less than a Mars colony.
But think about it. Who the hell wants to live in an underground colony on Earth, permanently? You're not gonna get many volunteers. And I guarantee *nobody* is going to fund it. Living underground in Kansas has zero glamour. Like it or not, humans love exploring new places and thanks to sci-fi, Mars has a tremendous romantic value.
And that's just the "human race survival contingency" aspect. In the long term (centuries), Mars has so much more to offer than Kansas underground. Think of the resources to be discovered, science to be done. It's a whole new world!