Avodah Zarah 23 - Animal that Has Been Left in the Stables
After the animal has been left in the stables of idol worshippers, we do not suspect that it was violated, unless it is definitely known. Therefore this animal, and any other animal bought from idol worshippers, may be brought as a sacrifice in the Temple. We also do not suspect that it has been worshipped - since in that case the idol worshipper would not have sold it. This is the opinion of the Sages. According to them, not leaving animals in the stables of idol worshippers is a requirement and a good advice.
However, Rabbi Eliezer disagrees. According to him, it is always suspected that an animal of idol worshippers has been sodomized. Thus, if one did leave the animal in the stables of idol worshippers, he can no longer bring it as a sacrifice.
Art: John Frederick Herring, Jnr. - Stable Interior with Cart Horse and Donkey