"Whoever lies with a beast" (Exodus 22:18): why do I need this? If [it speaks of] a man who comes upon a beast, that has already been stated. And if [it speaks of] a woman who brings the beast upon herself, that too has already been stated. What, then, does Scripture teach by saying "whoever lies with a beast"? This refers to the male who brings the beast upon himself. I have only [a domestic] beast; from where do I learn [that the same applies to] a wild animal? Scripture teaches, "whoever lies with a beast" [the inclusive phrasing]. "Shall surely be put to death" (Exodus 22:18): by stoning.
Whoever Lies With a Beast and the Reason for the Repetition
Mekhilta DeRabbi Shimon Ben Yochai 22:18
כל שוכב עם בהמה מה אני צריך אם איש הבא על הבהמה כבר אמור ואם אשה מביאה את הבהמה כבר אמורה מה ת"ל כל שוכב עם בהמה זה הזכור המביא את הבהמה עליו אין לי אלא בהמה חיה מנין ת"ל כל שוכב עם בהמה: מות יומת. בסקילה: