"From the flock" — to exclude the animal set aside for idolatry; "from the flock" — to exclude the goring ox. Rabbi Shimon said: because there is something in the beast used for bestiality not found in the goring ox, and something in the goring ox not found in the other. With the beast of bestiality, coercion is treated like consent; with the goring ox it is not. The goring ox pays a ransom after the owner's death; the beast of bestiality does not. And there is something in the beast of bestiality not found in the worshiped animal: the beast of bestiality is forbidden whether one's own or another's, while a worshiped animal of one's own is forbidden but another's is permitted; the covering of the beast of bestiality is permitted, but the covering of a worshiped one is forbidden. Therefore Scripture had to mention them all. And perhaps I should reverse it: "from the animal" to exclude the worshiped one, "from the herd" to exclude the beast of bestiality and its object? There the matter is settled from the context of the verse: concerning the beast it is written, "a woman shall not stand before an animal to lie with it," and concerning the herd it is written, "they exchanged their glory for the likeness of an ox" (Psalms 106:20). And this teacher derives it from elsewhere, as the Rabbis taught: the beast of bestiality and its object, the one set aside or already worshiped, the price of a dog, the mixed breed, and the mortally wounded are like consecrated animals upon which a passing blemish preceded their consecration, and they require a permanent blemish to be redeemed, as it says, "for their corruption is in them, a blemish is in them" (Leviticus 22:25). What is the scriptural teaching? The text is incomplete and should be read: from where that they are forbidden? As it says, "for their corruption is in them, a blemish is in them." And a master said: anything in which a blemish disqualifies, corruption disqualifies; and anything in which a blemish does not disqualify, corruption does not disqualify, as it says, "their corruption is in them, a blemish is in them." And the school of Rabbi Yishmael taught: wherever "corruption" is mentioned, it refers only to sexual sin and idolatry — sexual sin, as it is written, "for all flesh had corrupted its way upon the earth," and idolatry, as a graven image, "lest you act corruptly and make for yourselves a graven image" (Deuteronomy 4:16). And he who derives it from "from the animal" does not find "for their corruption is in them" instructive; while he who derives it from "for their corruption is in them" reads "from the animal, from the herd and from the flock" as excluding the aged, the sick, and the foul-smelling. As another taught: "from the sheep and from the goats you shall take" (these are limiting terms) excludes the aged, the sick, and the foul-smelling; and the school of Rabbi Yishmael holds that "from the sheep and from the goats you shall take" is simply the manner of Scripture's speech.
Tracing the Source That Bars the Corrupted Beast
Yalkut Shimoni on Torah 436:3
מִן הַצֹּאן לְהוֹצִיא אֶת הַמֻּקְצֶה וּמִן הַצֹּאן לְהוֹצִיא אֶת הַנּוֹגֵחַ אָמַר רַבִּי שִׁמְעוֹן מִפְּנֵי שֶׁיֵּשׁ בְּרוֹבֵעַ שֶׁאֵין בְּנוֹגֵחַ, וּבְנוֹגֵחַ שֶׁאֵין בְּרוֹבֵעַ רוֹבֵעַ עָשָׂה בּוֹ אֹנֶס כְּרָצוֹן נוֹגֵחַ לֹא עָשָׂה בּוֹ אֹנֶס כְּרָצוֹן נוֹגֵחַ מְשַׁלֵּם אֶת הַכֹּפֶר לְאַחַר מִיתָה רוֹבֵעַ אֵין מְשַׁלֵּם אֶת הַכֹּפֶר לְאַחַר מִיתָה יֵשׁ בְּרוֹבֵעַ שֶׁאֵין בְּנֶעֱבָד וּבְנֶעֱבָד שֶׁאֵין בְּרוֹבֵעַ, רוֹבֵעַ בֵּין שֶׁלּוֹ וּבֵין שֶׁל אַחֵר אָסוּר, נֶעֱבָד שֶׁלּוֹ אָסוּר שֶׁל אֲחֵרִים מֻתָּר רוֹבֵעַ צִפּוּיָיו מֻתָּרִין, נֶעֱבָד צִפּוּיָיו אֲסוּרִין לְפִיכָךְ הֻצְרַךְ הַכָּתוּב לוֹמַר אֶת כֻּלָּן. וְאֵיפּוּךְ אֲנָא "מִן הַבְּהֵמָה" לְהוֹצִיא אֶת הַנֶּעֱבָד, מִן הַבָּקָר לְהוֹצִיא רוֹבֵעַ וְנִרְבָּע. הָתָם מֵעִנְיָנָא דִּקְרָא גַּבֵּי בְּהֵמָה כְּתִיב "וְאִשָּׁה לֹא תַעֲמֹד לִפְנֵי בְהֵמָה לְרִבְעָהּ", וְגַבֵּי בָּקָר כְּתִיב (תהלים קו, כ) "וַיָּמִירוּ אֶת כְּבוֹדָם בְּתַבְנִית שׁוֹר". וְהָדֵין תַּנָּא מַיְיתִי לָהּ מֵהָכָא, דְּתָנוּ רַבָּנָן הָרוֹבֵעַ וְהַנִּרְבָּע, וְהַמֻּקְצֶה וְהַנֶּעֱבָד וְהַמְּחִיר וְהַכִּלְאַיִם וְהַטְּרֵפָה הֲרֵי הֵן כְּקָדָשִׁים שֶׁקָּדַם מוּם עוֹבֵר לְהֶקְדֵּשָׁן וּצְרִיכִין מוּם קָבוּעַ לִפְדּוֹת עֲלֵיהֶן, שֶׁנֶּאֱמַר (ויקרא כב, כה) "כִּי מָשְׁחָתָם בָּהֶם מוּם בָּם", מַאי תַּלְמוּדָא חִסוּרֵי מֵחַסְרָא וְהָכִי קְתָנִי וּמִנַּיִן שֶׁאֲסוּרִין שֶׁנֶּאֱמַר (שם) "כִּי מָשְׁחָתָם בָּהֶם מוּם בָּם", וְאָמַר מַר כָּל שֶׁהַמּוּם פּוֹסֵל בּוֹ הַשְׁחָתָה פּוֹסֶלֶת בּוֹ, וְשֶׁאֵין הַמּוּם פּוֹסֵל בּוֹ אֵין הַשְׁחָתָה פּוֹסֶלֶת בּוֹ, שֶׁנֶּאֱמַר "כִּי מָשְׁחָתָם בָּהֶם מוּם בָּם". וְתָנָא דְבֵי רַבִּי יִשְׁמָעֵאל כָּל מָקוֹם שֶׁנֶּאֱמַר הַשְׁחָתָה אֵינוֹ אֶלָּא דְּבַר עֶרְוָה וַעֲבוֹדָה זָרָה, דְּבַר עֶרְוָה דִּכְתִיב "כִּי הִשְׁחִית כָּל בָּשָׂר אֶת דַּרְכּוֹ עַל הָאָרֶץ" "פֶּסֶל", (דברים ד, טז) "פֶּן תַּשְׁחִיתוּן וַעֲשִׂיתֶם לָכֶם פֶּסֶל", וּמָאן דְּאָמַר דְּנָפְקָא לֵיהּ מִמִּן הַבְּהֵמָה תִּיפּוּק לֵיהּ מִ"כִּי מָשְׁחָתָם בָּהֶם" לֹא מַשְׁמַע לֵיהּ וּמָאן דְּנָפְקָא לֵיהּ מִ"כִּי מָשְׁחָתָם בָּהֶם", תִּיפּוּק לֵיהּ מִמִּן הַבְּהֵמָה, קָסָבַר מִן הַבְּהֵמָה מִן הַבָּקָר וּמִן הַצֹּאן, פְּרָט לְזָקֵן וּלְחוֹלֶה, וּמְזֹהָם וְהַהוּא דְּנָפְקָא לֵיהּ לְרוֹבֵעַ וְנִרְבָּע, מִמִּן הַבְּהֵמָה, זָקֵן חוֹלֶה וּמְזֹהָם מְנָא לֵיהּ, נָפְקָא לֵיהּ מִדְּתַנְיָא "מִן הַכְּבָשִׂים וּמִן הָעִזִּים תִּקָּחוּ", הֲרֵי אֵלּוּ מִעוּטִין פְּרָט לְזָקֵן וּלְחוֹלֶה וְלִמְזֹהָם וְהַהוּא תָּנָא דְבֵי רַבִּי יִשְׁמָעֵאל סָבַר מִן הַכְּבָשִׂים וּמִן הָעִזִּים תִּקָּחוּ אוֹרְחֵיהּ דִּקְרָא הוּא לְאִשְׁתַּעוּיֵי הָכִי.