Origins of the radiation resistance of glasses