וַיֹּ֤אמֶר הַמֶּ֙לֶךְ֙ אֶל־אִתַּ֣י הַגִּתִּ֔י לָ֧מָּה תֵלֵ֛ךְ גַּם־אַתָּ֖ה אִתָּ֑נוּ שׁ֣וּב וְשֵׁ֤ב עִם־הַמֶּ֙לֶךְ֙ כִּֽי־נָכְרִ֣י אַ֔תָּה וְגַם־גֹּלֶ֥ה אַתָּ֖ה לִמְקוֹמֶֽךָ׃
Da fragte der König den Ittai aus Gat: Warum willst auch du mit uns gehen? Kehre zurück und bleibe bei dem [neuen] Könige; denn du bist ein Ausländer, bald wirst du nach deinem Orte zurückkehren.
Or HaChaim
We may also understand the words את אלוהיהם by paying attention to its peculiar position in the verse. It is placed between mention of the worshipers and mention of the objects worshiped. The normal syntax of the verse should have been: עבדו שם הגוים את אלוהיהם אשר אתם יורשים אתם, "where the Gentiles worshiped their deities… which you are about to inherit." The reason the Torah departed from its normal syntax may be understood in light of Avodah Zarah 44 where Rav Hunna poses a question about two contradictory verses in Scripture. We read in Chronicles I 14,12 that David burned the idols the Philistines left behind. In Samuel II 5,21 David and his men are reported to have "carried these idols." The Talmud answers that there is no contradiction. In the description in Samuel the prophet refers to what David did after the arrival of Ittai Hagitti, whereas in the description in Chronicles Ezra reported about what was done before the arrival of Ittai Hagitti. [a loyal non-Jewish battalion commander of David, compare Samuel II 15,19-22. Ed.] We are told in Samuel II 12,30 that David took the crown of the king of the Ammonites (after Yoav defeated him) and put it on his own head. How could he do this seeing it had served idolatrous purposes? Rav Nachman answered that Ittai Hagitti had first annulled whatever idolatrous character the crown possessed. From this episode it appears that it is possible even to inherit (make use of) the idol itself! This is possible only when the former adherents of such an idol have themselves deprived it of their original function. Only in such cases may the Israelites subsequently derive benefit from erstwhile idols. This is what Moses had in mind when he wrote אשר יורשים אתם את אלוהיהם, "whom you inherit when their idols are present." Moses alluded to a situation similar to that when Ittai Hagitti annulled the idol's significance as an idol.