The Torah commands the Jewish people to remove themselves from interaction with pagan idol worship and from its adherents, so the reality of a Jewish population that lives in close proximity with non-Jews and interacts with them on a regular basis raises many questions. Given the centrality of idol worship to the daily life of a pagan, especially around certain holidays and places, the first perek of Massekhet Avoda Zara discusses the need for Jews to avoid business interactions with these non-Jews around the time of their holidays.
The first Mishna forbids engaging in business interactions – e.g. borrowing and lending – with pagans for three days before their holidays. Although this would appear to forbid both buying and selling, Tosafot and other rishonim quote Rabbeinu Tam as teaching that only selling would be forbidden, and even in the case of selling, only selling things that can be used in the course of worship cannot be sold.
The Gemara (6a) offers two reasons for this prohibition. One suggestion is that the non-Jew will be pleased with his purchase and will come to thank the pagan deity when the holiday comes about. Another suggestion is that by selling him something that will allow him to fulfill his worship, the Jew transgresses the prohibition of lifnei iver lo titen mikhshol – not to put a stumbling block before the blind. Since pagan idol worship is forbidden as one of the seven Noaḥide laws, it would be prohibited for a Jew to assist the non-Jew in performing this worship.
The Gemara does not reach a clear conclusion as to which of these reasons is primary. We find that Rashi quotes only the first reason – that the non-Jewish pagan will thank his god. The Meiri and the Ritva, however, argue that the main reason is because of lifnei iver, and the other reason that is mentioned is taught only for a case where lifnei iver would not apply.