It's like they have their own gravitational pull.
Comets must also survive the gravitational pull of the planets.