Rabbi Shmuel bar Naḥman said: [This is analogous] to a king who had an orchard and he planted rows of nuts, of apples, and of pomegranates, and he gave them over to his son. When his son would fulfill his will, the king would search for and find a beautiful sapling in the world, and he would uproot it and plant it in that orchard. When his son would not fulfill his will, the king would see some beautiful sapling in the orchard and uproot it.
So too, as long as Israel fulfills the will of the Omnipresent, He sees what righteous individual there is among the nations of the world, like Yitro and Raḥav, and He brings them and attaches them to Israel. When Israel does not fulfill the will of the Holy One blessed be He, He sees what righteous, upright, proper, and God-fearing individual there is among them, and He takes them from their midst.