"And he shall bring his offering, a she-goat of the goats" (Leviticus 4:28) - from where do we learn that he brings one in its first year? It is a logical inference: this one brings a sin offering and the leper brings a sin offering; just as the leper's sin offering is in its first year, so too this one is in its first year. No - if you said this of the leper's sin offering, which requires libations, would you say it of this one, which does not require libations? The nazirite's sin offering proves it, for it does not require libations and yet comes in its first year. No - if you said this of the nazirite's sin offering, which has other blood [offerings] with it, would you say it of this one, which has no other blood with it? The sin offering for idolatry proves it, for it has no other blood with it and yet comes in its first year. No - if you said this of the sin offering for idolatry, which is fixed [obligatory], would you say it of this one, which is not fixed; since it is not fixed, perhaps it does not come in its first year? The verse teaches "one law shall there be for you for him who does anything in error" (Numbers 15:29) - thus everyone who acts in error is like idolatry: just as the sin offering for idolatry is in its first year, so too this one is in its first year. If so, just as the sin offering for idolatry is a she-goat - when it says "for you," it comes to include the goats for idolatry; "for you" to include the goats of the festivals; "for him who does" to include the goat of the prince.
Why the She-Goat Sin Offering Must Be a Yearling
Yalkut Shimoni on Torah 469:37
וְהֵבִיא (אֶת) קָרְבָּנוֹ שְׂעִירַת עִזִּים, [מִנַּיִן] (יָכוֹל) שֶׁיָּבִיא בַּת שְׁנָתָהּ, וְדִין הוּא, זֶה מֵבִיא חַטָּאת וּמְצֹרָע מֵבִיא חַטָּאת, מַה חַטָּאת מְצֹרָע בַּת שְׁנָתָהּ, אַף זוֹ בַּת שְׁנָתָהּ. לֹא אִם אָמַרְתָּ בְּחַטָּאת מְצֹרָע שֶׁהִיא טְעוּנָה נְסָכִים תֹּאמַר בְּזוֹ שֶׁאֵינָהּ טְעוּנָה נְסָכִים. חַטָּאת נָזִיר תּוֹכִיחַ שֶׁאֵינָהּ טְעוּנָה נְסָכִים וּבָאָה בַּת שְׁנָתָהּ. לֹא אִם אָמַרְתָּ בְּחַטַּאת נָזִיר שֶׁיֵּשׁ עִמָּה דָּמִים אֲחֵרִים תֹּאמַר בְּזוֹ שֶׁאֵין עִמָּה דָּמִים אֲחֵרִים. חַטַּאת עֲבוֹדָה זָרָה תּוֹכִיחַ שֶׁאֵין עִמָּהּ דָּמִים אֲחֵרִים וּבָאָה בַּת שְׁנָתָהּ. לֹא אִם אָמַרְתָּ בְּחַטַּאת עֲבוֹדָה זָרָה שֶׁהִיא קְבוּעָה, תֹּאמַר בְּזוֹ שֶׁאֵינָהּ קְבוּעָה הוֹאִיל וְאֵינָהּ קְבוּעָה לֹא תָּבוֹא בַּת שְׁנָתָהּ. תַּלְמוּד לוֹמַר (במדבר טו, כט) "תּוֹרָה אַחַת יִהְיֶה לָכֶם לָעֹשֶׂה בִּשְׁגָגָה", הֲרֵי כָּל הָעוֹשֶׂה בִּשְׁגָגָה כַּעֲבוֹדָה זָרָה, מַה חַטַּאת עֲבוֹדָה זָרָה בַּת שְׁנָתָהּ, אַף זוֹ בַּת שְׁנָתָהּ. אִי מַה חַטַּאת עֲבוֹדָה זָרָה בִּשְׂעִירָה, כְּשֶׁהוּא אוֹמֵר "לָכֶם" לְרַבּוֹת שְׂעִירֵי עֲבוֹדָה זָרָה. "לָכֶם" לְרַבּוֹת שְעִירֵי רְגָלִים. "לָעֹשֶׂה" לְרַבּוֹת שְׂעִיר נָשִׂיא.