The previous Mishna (66b) taught that a mamzer – a child born as the result of an incestuous or adulterous relationship – is not allowed to marry into the normative Jewish community, and that furthermore, any child born to a mamzer will also have that same status. This leads Rabbi Tarfon in the Mishna on our daf to teach that there is a way for a mamzer to arrange that his children will not be mamzerim. Rabbi Tarfon suggests that a mamzer can purchase a shifhah kena’anit – a non-Jewish maidservant – and marry her. In such a case, the children will get her status and will be considered avadim kena’anim – non-Jewish slaves. At that point he can release them to freedom and they will become full-fledged members of the Jewish community without the stigma (and concomitant personal halakhic problems) of being a mamzer.
According to the conclusion of the Gemara, this arrangement works not only ex-post facto, but it is recommended as a valid plan for someone who finds that he is a mamzer. This leads rishonim to question how Rabbi Tarfon can permit a mamzer to marry a shifhah kena’anit – after all, despite his difficult marital situation, a mamzer is considered by Jewish law to be obligated in all the commandments. How can we permit him to marry a non-Jewish slave girl?
Tosafot Ri”d suggests that we must distinguish between the prohibition against marrying a non-Jewish woman, whose source ve-lo tit’haten bam (Devarim 7:3) is a general prohibition for all Jews, and the source forbidding marriage to a shifhah kena’anit – ve-lo yehiyeh kadesh be-venei yisra’el (Devarim 23:18) – which is understood to forbid sexual promiscuity among the Jewish people. This may not apply to someone who was, himself, the product of a promiscuous, forbidden relationship.
Some suggest that according to those opinions (e.g. the Rambam) who view marriage with a shifhah kena’anit as being forbidden only on a Rabbinic level, the sages permitted the mamzer to disregard that law in order to save his children from being mamzerim. That position is disputed, however, by Rashi, Tosafot and other rishonim.