The chances of an object leaving one star’s gravity and being pulled in by another star’s gravity are very very very small. I mean really small. There is a lot of distance between stars, so much that if two galaxies collided, the stars wouldn’t come anywhere near hitting each other.
True, however when multiple bodies interact weird stuff happens. It could have been accelerated out.