"The firstborn of your sons you shall give to Me; so shall you do with your ox and your sheep" (Exodus 22:29). Just as the human firstborn is redeemed within the borders [of the land, anywhere], so the firstborn animal is treated within the borders; except that they are not brought up to Jerusalem, but are eaten in their blemish in any place. The expounders of hidden meanings say: "You shall not curse God" is joined to "your fullness and your tithe you shall not delay" to teach that if you curse a judge, your produce becomes accursed. And so you find that when they corrupted justice, the produce was diminished, as it is written, "And it came to pass in the days when the judges judged" (Ruth 1:1), when the one being judged would judge his judges, "that there was a famine in the land," because they perverted justice. But if you are meritorious in judgment, your produce will be whole: "your fullness and your tithe you shall not delay." And if you do so, you will have male children: "the firstborn of your sons you shall give to Me." If you do so, then your ox and your sheep and blessing will be present in every place. Because it says "on the eighth day you shall give it to Me" (Exodus 22:29), one might think Israel gives the firstborn animal to the priest when it is eight days old. Scripture says, "the firstborn of your sons you shall give to Me; so shall you do with your ox and your sheep." Just as the human firstborn is not redeemed until thirty days, so the firstborn animal is given at thirty days. From here you say: how long is Israel obligated to care for a firstborn of the small cattle? Thirty days. One might think for the large cattle also thirty days. Scripture says "so shall you do with your ox," adding for it another act of tending: a firstborn of the small cattle, thirty days, and of the large cattle, fifty days. "Seven days it shall be with its mother, and on the eighth day" (Exodus 22:29). One might think the firstborn is fit on the eighth day but unfit from the eighth day onward. Scripture says regarding consecrated animals, "from the eighth day onward it shall be accepted" (Leviticus 22:27). One might think they are fit from the eighth day onward but unfit on the eighth day itself. Scripture says "on the eighth day you shall give it to Me." From where do we apply what is said of the one to the other? Scripture says "its mother"; "its mother" is stated for a verbal analogy (gezeira shava): just as "its mother" stated elsewhere means a consecrated animal may suckle from a non-consecrated one, so "its mother" stated here means the same. From here they said: consecrated animals may not suckle one another. "You shall give it to Me." This teaches that all the offerings are fit from the eighth day; even so, from the thirtieth day and upward it is more cherished.
The Eighth-Day Firstborn Animal and the Fruit of Justice
Mekhilta DeRabbi Shimon Ben Yochai 22:29
בכור בניך תתן לי כן תעשה לשורך לצאנך מה בכור אדם בגבולין כך בכור בהמה בגבולין אלא שאין עולין לירושלים אבל נאכלין במומן בכל מקום: דורשי רשומות אומ' אלהים לא תקלל מלאתך ודמעך לא תאחר שאם קללת דיין תבואתך את מקלל וכן את מוצא כשקלקלו הדין נתמעטה התבואה דכת' (רות א' א') ויהי בימי שפוט השופטים שהיה הנשפט שופט את שופטיו ויהי רעב בארץ מפני שעותו את הדין אבל אם זכיתם הדין תהיה תבואתך שלמה מלאתך ודרמעך לא תאחר ואם עשיתם כן הוין לך בנים זכרים בכור בניך תתן לי עשיתם כן הרי שורך וצאנך והברכה מצויה בכל מקום: לפי שהוא אמר ביום השמיני תתנו לי יכול יהוא ישראל נותנין בכור בהמה לכהן כשהוא בן שמונה ת"ל בכור בניך תתן לי כן תעשה לשורך לצאנך מה בכור אדם אינו נפדה אלא לשלשים יום אף בכור בהמה שלשים יום מכאן אתה אומר עד כמה ישראל חייבין לטפל בבכור בהמה דקה שלשים יום יכול אף בגסה שלשים יום ת"ל כן תעשה לשורך ריבה לו הכת' עשייה אחרת עד כמה ישראל חייבין ליטפל בבכור דקה שלשים יום ובגסה חמשים יום: שבעת ימים יהיה עם עמו וביום השמיני. יכול בכור כשר ביום השמיני ופסול מיום השמיני ולהלן ת"ל במוקדשין (ויקרא כ"ב כ"ז) מיום השמיני והלאה ירצה יכול יהוא כשרין משמיני ואילך ופסולין ביום השמיני ת"ל ביום השמיני תתנו לי מניין ליתן את האמור של זה בזה ואת האמור של זה בזה ת"ל אמו אמו לגזרה שוה מה אמו האמור להלן קדש יונק מן החול אף אמו האמור כן קדש יונק מן החול מכאן אמרו לא יניקו קדשים זה את זה: תתנו לי. מלמד שכל הקרבנות כשרין מיום השמיני ואע"פ כן משלשים יום ולמעלה חביב יותר: