A nuclear holocaust would not kill all the humans. A major asteroid strike would not kill all the humans. A super-flu pandemic would not kill all the humans. A single short circuit, puncture, or virus could kill all the humans on Mars.
The Earth is the perfect place for humans to live, out of the entire universe. If we can't figure out how to survive long-term on this planet, that's why we'll go extinct.
"Because it's there" is a great reason for an explorer to want to go somewhere. But that doesn't automatically have value for the future of humanity.