Mar Yehudah and Bati b. Tobi were sitting with King Shapur and a citron was set before them. [The king] cut a slice and ate it, and then cut a slice and handed it to Bati b. Tobi. After that he stuck [the knife] ten times in the ground, cut a slice [of the citron] and handed it to Mar Yehudah.
Bati b. Tobi said to [the king], ‘Am I not an Israelite!’ (Why did you not clean the knife for me?)
He replied, ‘Of him I am certain that he is observant [of Jewish law] but not of you.’
According to another version he said to him, ‘Remember what you did last night!’
(Rashi - The Persians would provide women for their male guests. King Shapur sent women to his two guests. Bati b. Tobi accepted her, whereas Mar Yehuda refused her.)
(Avoda Zara 76b).
Here, with this humorous ending, the Gemara underscores that one of the key areas that we must navigate when interacting with the non-Jewish world is not idolatry, but kashrut and sexual improprieties. More than that, the Gemara even suggests that these are core to one's Jewish identity: "Am I not an Israelite!". In an interesting way, this seems to be an ongoing sub-textual theme in the mesekhet. While the issue of idolatry is, on the surface, its primary concern, one senses that its real concerns lie elsewhere. Consider the opening of the mesekhet:
Mishnah. On the three days preceding the festivities ('edeihem) of idolaters, it is forbidden to transact business with them…
Gemara. … He who quotes ‘ed (as the spelling in the mishna) is not in error, for Scripture also says: Let them bring their witnesses [testimonies] that they may be justified. (Isa. 43:9).
In the World to Come, the Holy One, blessed be He, will take a Torah scroll in His embrace and proclaim: ‘Let him who has occupied himself herewith, come and take his reward.’
Thereupon all the nations will crowd together… Thereupon the Kingdom of Edom (Rome) will enter first before Him…
The Holy One, blessed be He, will then say to them: ‘Wherewith have you occupied yourselves?’ They will reply: ‘O Lord of the Universe, we have established many market-places, we have erected many baths, we have accumulated much gold and silver, and all this we did only for the sake of Israel, that they might [have leisure] for occupying themselves with the study of the Torah.’
The Holy One, blessed be He, will say in reply: ‘You foolish ones among peoples, all that which you have done, you have only done to satisfy your own desires… Are there any among you who have been declaring 'this'?’ And ‘this’ is naught else than the Torah, as it is said: And 'this' is the Law which Moses set before the children of Israel….
The nations will then say, ‘Sovereign of the Universe, has Israel, who accepted the Torah, observed it? The Holy One, blessed be He, will reply, ‘I can give evidence that they observed the Torah.’…
Then the Holy One, blessed be He, will say, ‘Some of yourselves shall testify that Israel observed the entire Torah. Let Nimrod come and testify that Abraham did not [consent to] worship idols; let Laban come and testify that Jacob could not be suspected of theft; let Potiphar's wife testify that Joseph was above suspicion of immorality; let Nebuchadnezzar come and testify that Hanania, Mishael and Azariah did not bow down to an image; let Darius come and testify that Daniel never neglected the [statutory] prayers; let Bildad the Shuhite, and Zophar the Naamathite, and Eliphaz the Temanite [and Elihu the son of Barachel the Buzite] testify that Israel has observed the whole Torah; as it is said, Let them [the nations] bring their [own] witnesses, that they [Israel] may be justified.’
(Avoda Zara 2a-3a)
This lengthy agadata that opens the mesekhet, a mesekhet that begins with the prohibition to do business on pagan holidays, focuses not on idolatry or paganism, but on observance and non-observance of the Torah. In the World to Come, the nations will not be judged for their idolatry. They will be judged for their actions - where they done to further the goals of the Torah? Did they learn Torah and keep Torah, or enable others to do so? (The Gemara addresses the issue of fairness here, inasmuch as they were not commanded in the Torah, and states that their accountability is also because of their non-observance of the seven Noachide laws). It is the question of Torah and mitzvot that God will ask them, "This" - the Torah that God is holding in God's hands -is what ultimately matters in the end of days.
Now, the verse that the Gemara started with from Isaiah 43 is from a passage describing the judgment at the end of time, but there the focus is not Torah and mitzvot, but in who is the true God:
9. Let all the nations be gathered together, and let the people be assembled; who among them can declare this, and show us former things? Let them bring forth their witnesses, that they may be justified; or let them hear, and say, It is truth.
10. You are my witnesses, said the Lord, and my servant whom I have chosen; that you may know and believe me, and understand that I am he; before me there was no God formed, neither shall there be after me.
11. I, I myself, am the Lord; and beside me there is no savior.
12. I have declared, and have saved, and I have proclaimed, and there was no strange god among
you; therefore you are my witnesses, said the Lord, that I am God.
The Gemara, in an ironic twist on this passage, refocuses the judgment from belief in God and rejection of idolatry, to "this", the Torah, and bearing witness that the Jews have kept the Torah. Thus, in the final passage of this agadata, witness is brought that the Jews kept all the mitzvot - not worshipping idols, not stealing, not committing adultery (all part of the seven Noachide laws), prayer, and all the mitzvot. True, rejecting idolatry is among these mitzvot, but it is given no greater weight then the others.
What this Gemara is thus doing is recognizing and stating that the battlefield of Jewish identity no longer is being fought over the issue of idolatry. The threat of the "outside" world is not - like it was in the time of Isaiah and the First Temple, the threat of idolatry. The world had changed since then. As the Gemara in Sanhedrin (64a) relates, the evil inclination for idolatry had been nullified in the time of the Second Temple. In the world of the Gemara, Jewish identity was much more about Torah and mitzvot and much less about rejection of idolatry, something even the non-Jews were coming around to. (See the passage in Avoda Zara 65a, where some non-Jews were recognized as non-idolaters, and the possible broadening of the category of ger toshav.)
Thus, a good deal of the mesekhet deals not only with idolatry, but also with how to more generally navigate our interactions with the non-Jewish world, and a good deal of attention is given to interactions with them that could lead to furthering violence or sexual transgressions, and how to avoid purchasing food from them that might not be kosher. Also in the food realm a number of items - bread, oil, wine - are prohibited if produced by them, even if the ingredients are kosher (the prohibition against oil was revoked, and the one relating to bread was later limited to home baked bread). This is out of a concern that too much socialization - often something that happens over food and drink - will lead to assimilation and intermarriage. These sections of the mesekhet, then, deal with the realities of maintaining Jewish identity in a dominant secular culture where the concern is not idolatry, but one of values, of observance of mitzvot, and of assimilation and intermarriage.
Now, the mesekhet ends with two larger chapters devoted almost entirely to the prohibition of the wine of non-Jews. Such wine is forbidden because it may have been used in an idolatrous context. Thus, the dominant theme of the end of the mesekhet seems to again be that of idolatry. However, this is not clearly the case. First, there is a question - not dominant in the gemara, but emphasized by the Rishonim - whether the wine is prohibited primarily because of idolatry concerns or because of intermarriage concerns. While the Rishonim by and large emphasize the intermarriage issue, the Gemara by and large to ignore that concern. Nevertheless, it also does not highlight the idolatry concern. So, while some halakhot take into account the idolatry context (e.g., is the non-Jew who is touching the wine old enough to understand that rituals of idolatry) others seems to ignore it (For example, the gemara states that a non-Jew can make the wine not kosher by pouring it, because his energy moved it. However, this is only a secondary problem, because it was not touched. Now, if the concern were idolatry, touch should be irrelevant, because this is how wine is offered as an idolatrous libation). In fact, what happens is that the issue of idolatry recedes into the background regarding the wine, and the wine is treated the category of a completely different halakhic realm - that of tumah and ta'aharah. These laws are used to define what type of touch is problematic, when we are concerned that the wine was touched, and how to dry out and clean vessels that have absorbed non-kosher wine.
Wine of non-Jews is also connected to standard principles of kashrut, in terms of mixture of like and unlike, and when mixtures give off bad tastes. Similarly, non-kosher food is often referred to as tamei, impure, and the word "to purify", li'taher, is also used in kashering vessels. This is the word that is used in the last mishna of the mesekhet which deals with kashering and toveling vessels - how does one make these non-kosher vessels tahor? Thus, even the laws of stam yaynam, wine of non-Jews, have become a standard tumah and kashrut type of law, and the mesekhet seamlessly moves from yayn nesekh, wine of idolatrous libation, to general laws of kashrut, to ending with a process of kashering and toveling vessels. It is a shift of our concern from a world of idolatry to a world of non-kosher products and non-kosher activities, from distinguishing ourselves based on belief to distinguishing ourselves based on Torah and mitzvot.
In a way, this is actually symbolized in the halakha of kashering and toveling vessels. The way a vessel from a non-Jewish home can be brought into a Jewish home to be used is by purging it of all the non-kosher taste that is inside it. Then, the vessel must be immersed in a mikveh, and then it may be used. The purpose of the immersion is hard to understand, and it seems to be required in order to change the pots identity - to transform it from a non-Jewish pot into Jewish pot. That is, its identity is a Jewish or not-Jewish pot is based on kashrut concerns, and for this identity shift to happen, the pot must first be rid of its non-kosher taste (this follows Ra'ah's approach to tvillah in contradistinction to Tosafot). This process of kashering can be demanding at times, such as in the case of metal grates, requiring an outside scouring of the food burned on the metal, and then heating it up with a blow torch until it becomes white hot. Now, the analogous case to kashering pots in the world of idolatry is that of annulling idols. What is required for a Jew to take possession of an idol, for the idol to be kashered? Interestingly, very little - an idol can be made permissible if any non-Jew, even one who is not a worshipper of this god, nullifies it through a small physical act, and perhaps even a verbal one. Thus, we are left with the ironic result that to take possession of an idol can be relatively easy, whereas to make something a Jewish pot, can require comparatively more effort. Jewish identity - even where pots, pans, statues and idols are concerned - is more about kashrut and mitzvot than it is about rejecting avodah zarah.
And thus we have the final story of the mesekhet. What is means to be a Jew in the contemporary world (even contemporary for the Talmud!) is not about rejecting idolatry. What is means is to hold firm to the world of Torah and mitzvot even as we interact, eat together, socialize, befriend and learn from non-Jews. We do not run away from this larger world and hide and cloister ourselves, but we also do not pretend that we do not have to draw any lines, that we do not have to be on guard against a weakening of our commitments, against assimilation and against intermarriage. Our identity is the Torah, Torah values, and mitzvot, and we must do all we can to hold fast to and strengthen this identity. When we ask rhetorically "Am I not an Israelite?!" let us make sure that the response is not "Remember what you did last night!"