This isn't true at all. A somewhat-intelligent species with limited resources would indeed work no dealing with such a problem. However, a stupid species would simply ignore the problem, which is exactly what we're doing.
Do you live in an off-the-grid nuclear bunker, or a home? Do you wear a bulletproof vest, and a motorcycle helmet when driving a car, or walking on a sidewalk? Do you hoard decades worth of food?
An 'intelligent' person would do all of those things - because, after all, nuclear war can start any moment, our roads and sidewalks are dangerous places, and you never know where your next meal is going to come from.
Worrying about planet-ending disasters, and establishing civilization in space is much like doing any of the things I've listed. It's not intelligent - it's a non-cost-efficient response to incredibly unlikely occurrences. Especially when there are incredibly likely occurrences, that we'd be much better off preparing for, instead.
These are bad comparisons. There are too many people on Earth now for us to acquire all our resources here without a large environmental cost, which even without a killer asteroid is going to bite us in the ass. There's endless resources in space, so logically we should be building the technology and capability to go there and harvest them. A by-product of that is also being able to live there and have an insurance policy just in case there's a planet-ending disaster.
In short, planet-ending disasters are not the only reason to develop these capabilities, and it's shortsighted and stupid to continue to destroy our environment here without taking advantage of all the resources and opportunities outside our gravity well.
The economic cost of extracting Earth resources + environmental restoration/remediation is many orders of magnitude lower then the cost of extracting space resources, and will remain many orders of magnitude lower for any realistic projections of the future.
If we cared about this sort of thing, we would be doing it now, as opposed to sitting on our hands, waiting for magical space unicorns to be invented.