1) BUYING AN ANIMAL FROM A NOCHRI TO BRING AS A KORBAN
QUESTION: The Gemara points out a contradiction between the Mishnah (22a) and the Beraisa. The Mishnah teaches that one may not park his animal at an inn of a Nochri, because the Nochri is suspected of Revi'ah. The Beraisa teaches that one may purchase an animal from a Nochri to bring as a Korban, which implies that a Nochri is not suspected of Revi'ah. Ravina answers that although l'Chatchilah one must take into account the possibility of Revi'ah and thus he may not entrust his animal with a Nochri, b'Di'eved one need not suspect that the animal suffered Revi'ah in the past with regard to bringing it now as a Korban.
What does the Gemara mean when it says that one is permitted to bring the animal as a Korban, since it is "b'Di'eved"? In what way is this situation b'Di'eved? The Beraisa is saying that one may buy an animal from a Nochri to bring as a Korban, which implies that one may but it and offer it as a Korban even l'Chatchilah!
ANSWERS:
(a) RASHI (DH Ravina) explains that the word "b'Di'eved" here does not mean that the undesirable act has already been done. Rather, it means that the question which the Gemara is discussing involves a question of what occurred (in the past) and not what will occur (in the future).
The RITVA explains this in more detail, based on the Gemara in Gitin (28b). The Gemara there teaches that if a Kohen gives his wife (who is a Bas Yisrael) a Get on the condition that it take effect a moment before his death, the woman is prohibited from eating Terumah immediately. Her husband might die the next minute and render her divorced from him, and prohibited from eating Terumah, retroactively. In contrast, if a Kohen married to a Bas Yisrael leaves town on an extended trip, the woman is permitted to eat Terumah while he is absent and she does not have to be concerned that perhaps her husband died. Rava explains that the reason for this distinction is that in the first case the concern is that the husband might die at a future time (the next minute), retroactively disqualifying her from eating Terumah. A Chazakah (that he has been alive until now) cannot determine what will be his status in the future; it can determine only what his status is at the present moment. In the second case, the concern is that the husband might be dead at the present moment. In such a case, the Chazakah can determine that since he was alive when he left town, he probably is still alive at the present moment.
Similarly, one may not leave his animal in the care of a Nochri because of the concern that the Nochri might be Rove'a the animal. However, one may purchase an animal from a Nochri for a Korban, because there is no concern that the animal at present suffered Revi'ah, because the Chazakah determines that since it was not an animal that suffered from Revi'ah when it was born, it remains eligible to be brought as a Korban.
(b) TOSFOS RABEINU ELCHANAN and the CHIDUSHEI HA'RASHBA, however, seem to understand Ravina's words differently. They ask how Ravina will explain the Mishnah earlier (14b) which teaches that one is permitted to sell an animal to a Nochri (see TOSFOS here, DH Ravina). They answer that if the Chachamim would have prohibited the Jews from selling animals to Nochrim, a great loss would have resulted, and the animosity of the Nochrim would have been aroused. Therefore, selling animals to Nochrim is considered a situation of b'Di'eved, like the situation in the Gemara here.
These Rishonim clearly seem to understand that the Gemara here uses the concept of "b'Di'eved" with its normal meaning.
What, though, makes buying a Korban from a Nochri a situation of b'Di'eved?
Perhaps it is a situation of b'Di'eved because of what TOSFOS writes (22b, end of DH u'Reminhu). Tosfos explains that it is uncommon to find an animal fit to be offered as a Korban, since a Mum (blemish) easily disqualifies it. Therefore, it is sometimes necessary to purchase an unblemished animal from a Nochri. In addition, if animals bought as Korbanos from the stables of Nochrim are not accepted, animosity is likely to result (see Gitin 56a). For these reasons, buying a Korban from a Nochri is considered a situation of b'Di'eved.
2) HALACHAH: LEAVING AN ANIMAL AT THE INN OF A NOCHRI
OPINIONS: The Gemara offers a number of solutions to the contradiction between the Mishnah, which prohibits leaving an animal at an inn of a Nochri, and the Beraisa, which permits purchasing from a Nochri an animal to be offered as a Korban. However, according to all of the answers, the Mishnah remains with its prohibition against leaving an animal at the inn of a Nochri.
What is the Halachah in practice?
(a) TOSFOS (22a, DH Ein Ma'amidin) writes that throughout the generations, the teaching of this Mishnah was not followed in practice. The common practice has been to leave one's animal with a Nochri. To explain the common practice, Tosfos and the ROSH (2:1) suggest that the Halachah follows the view of Rebbi Pedas, who rules that the law of the Mishnah is the subject of a Machlokes between the Rabanan and Rebbi Eliezer, and the Halachah follows the more lenient view of the Rabanan who do not suspect a Nochri of Revi'ah.
Why should the Halachah follow the view of Rebbi Pedas and the Rabanan? Tosfos and the Rosh point out that the Halachah follows the more lenient opinion in cases of unsettled disputes regarding Isurim d'Rabanan (see Tosfos to Avodah Zarah 7a, DH b'Shel, in the name of Rabeinu Tam). Moreover, TOSFOS RABEINU ELCHANAN adds that although this Mishnah is a Stam Mishnah following the view of Rebbi Eliezer, the earlier Mishnah (14b) which permits selling an animal to a Nochri follows the opinion of the Rabanan, and the Halachah follows that Stam Mishnah.
However, the RAMBAM (in Hilchos Isurei Bi'ah 22:5) quotes the ruling of the Mishnah here, which follows the opinion of Rebbi Eliezer.
(b) The RASH MI'SHANTZ (14b) suggests that Ravina here follows the original assumption of Rav (on 14b), who asserts that the Halachah of the Mishnah applies only in a place where the custom is not to sell animals to Nochrim. Accordingly, nowadays -- when it is customary to sell animals to Nochrim -- it is also permitted to park an animal at the inn of a Nochri. See also RASHBA here, who makes a similar suggestion when he explains the opinion of Rebbi Pedas.
However, all of the Rishonim reject this approach. (See Tosfos DH Ravina and other Rishonim.)
(c) The MAGID MISHNEH there (Hilchos Isurei Bi'ah 22:5) cites in the name of the RASHBA that even if the Halachah of the Mishnah applies in places where it is customary to sell animals to Nochrim, it would not apply to the Nochrim of today who have much higher moral standards, and whose governments (and humane societies) even outlaw such acts. (See ME'IRI to Bava Kama 37b, who refers to the Nochrim of today who "conduct themselves in the ways of ethical behavior and proper etiquette," and see the similar statement cited by the SHITAH MEKUBETZES in the name of the Me'iri in the margin to the Gemara in Bava Kama 113a.) Therefore, it is permitted nowadays to entrust an animal with a Nochri. This is also the opinion of the RITVA (14b) and the RAN (on the Rif) here.
HALACHAH: The SHULCHAN ARUCH (YD 153:1) cites the opinion of the RASHBA and permits one to entrust an animal with a Nochri.

OTHER D.A.F. RESOURCES
ON THIS DAF