This unique feature of a black hole, of it being impossible to escape it, occurs only at the surface. In other words, just because there is a black hole somewhere, doesn't mean that everything gets gobbled up by it.

In fact, away from the surface of the black hole, objects respond to its gravity exactly like they would if another object of the same mass existed instead of the black hole. It is only when an object reaches the surface of the black hole does it become impossible for it to escape.