“Ok, Ill bite. If a gamma ray burst powerful enough to kill everything on earth, including cockroaches and liberals, occurred in our neighborhood, wouldnt it wipe out everyone hiding in the asteroid belt as well?”
No. The life on the Earth immediately killed by direct exposure to the gamma-rays are on and/or near the surface of the Earth’s hemisphere facing the collimated beam of gamma-rays. Life burrowed deeply enough in the soil, rock, and oceans on that hemisphere facing the gamma-rays may survive for awhile when shielded enough, but will perhaps perish afterwards due to the destruction of the Earth’s ozone layer protecting the biosphere from prolonged exposure to the Sun’s own ultraviolet light emissions and a variety of other forms of particle and energy radiation and due to the collapse of the Earth’s food chain. With such a major die-off, the Earth’s atmospheric composition would perhaps undergo another major change in composition the likes of which have not been seen for the last 2 billion years. It may descend into an earlier and extraordinarily severe ice age leading to a full or partial iceball climate in which the oceans freeze entirely or partially from the poles to the equator as it may have done 2 billion years ago.
By contrast, the Human habitats in the asteroids have much less to be worried about because the factors in play on the Earth and other planets with their Human habitats exposed upon the surfaces of these planets and moons does not exist on or inside the asteroids. Their environments would generally speaking be encased behind shields of solid asteroidal rock and/or iron and nickel fully capable of shielding the interior from the effects of the gamma-ray radiation. Since the people and the biosphere are mostly shielded within the interior of the asteroids, there are no consequences substantial enough to directly imperil the Human habitats. The major risks faced by the inhabitants of the asteroids is an unexpected exposure to the gamma-rays while aboard their spacecraft, working in spacesuits, and damage to unshielded equipment. Because your foodchain is also protected by the shielding of the asteroid, it too is likely to not be at risk of a major collapse.
“If the idea is that extraplanetary settlements would have to be heavily shielded for the space environment, wouldnt it be much easier, cheaper, and faster to establish well defended and well stocked havens here on Earth, and keep them staffed on a rotating basis?”
No, because you have not shielded your supporting planetary atmosphere, hydrosphere, cryosphere, and biosphere from the primary and secondary effects of the GRB. Furthermore, a killer asteroid can kill the human population of an entire planet, but it cannot kill the entire human population of the countless asteroids. One or more asteroids can be destroyed over time along with their human populations, but the remainder of the asteroids and their human populations can potentially last as long as or longer than the Sun, i.e. longer than 10 billion years.
By contrast, the Human population of the Earth is absolutely doomed as soon as the Earth inevitably suffers one of the many astronomical, biological, or other doomsday catastrophes which occur from time to time. That event could occur any day or maybe as long as hundreds of thousand of years from now. But, the chances of lasting one million years or longer on the Earth are not any good at all.