Aaron built an altar and proclaimed a feast to the Eternal in order to redirect the people's intent toward offering sacrifices to God's name rather than to the calf, possibly hoping Moses would return and they would abandon the calf; though some people among them intended their offerings for God's name as Aaron directed, others corrupted their intent and sacrificed to the calf itself, which is why Scripture attributes the sin to those latter people alone.
וַיַּרְא אַהֲרֹן טַעַם זֶה הַכָּתוּב שֶׁרָאָה אוֹתָם בְּרַע (שמות ל"ב:כ"ב) מְכַוְּנִים אֶל הָעֵגֶל, וְקָם וּבָנָה מִזְבֵּחַ, וְקָרָא "חַג לַה' מָחָר", שֶׁיִּזְבְּחוּ לַשֵּׁם הַמְּיֻחָד עַל הַמִּזְבֵּחַ אֲשֶׁר בָּנָה הוּא לִשְׁמוֹ, וְלֹא יִבְנוּ הֵם מִזְבְּחוֹת לַבֹּשֶׁת, וְלֹא תִּהְיֶה כַּוָּנָתָם בַּזְּבָחִים בִּלְתִּי לַה' לְבַדּוֹ: וְיִתָּכֵן שֶׁאָמַר "מָחָר" לְהַאֲרִיךְ לָהֶם, אוּלַי יָבֹא מֹשֶׁה וְיַעַזְבוּ אֶת הָעֵגֶל, וְהֵם הִשְׁכִּימוּ בַּבֹּקֶר וַיַּעֲלוּ עֹלֹת וַיַּגִּשׁוּ שְׁלָמִים וְלֹא אָמַר הַכָּתוּב וַיַּעֲלוּ לוֹ עוֹלוֹת וַיַּגִּישׁוּ לוֹ שְׁלָמִים, וְהָעִנְיָן, מִפְּנֵי שֶׁהָיוּ בָּהֶם מְכַוְּנִים לְשֵׁם הקב"ה כַּאֲשֶׁר אָמַר אַהֲרֹן, וּמֵהֶם מַשְׁחִיתִים וְזוֹבְחִים לָעֵגֶל. וְעַל אֵלֶּה אָמַר הקב"ה לְמֹשֶׁה (שמות ל"ב:ח') "וַיִּשְׁתַּחֲווּ לוֹ וַיִּזְבְּחוּ לוֹ", כִּי הֵם הַחַטָּאִים. וְאִם אוּלַי הָיָה אַהֲרֹן הַמַּקְרִיב קָרְבָּנוֹת, אָמַר סְתָם וַיַּעֲלוּ עֹלֹת וַיַּגִּשׁוּ שְׁלָמִים, כִּי הוּא מְכַוֵּן לְשֵׁם ה', וְהֵם דַּעְתָּם אֶל הָעֵגֶל אֲשֶׁר עָשׂוּ, וְהָיוּ הַבְּעָלִים מְפַגְּלִין:
AND AARON SAW. The meaning of this verse is that Aaron saw them set on evil, intent upon making the calf, and he arose and built an altar and proclaimed, Tomorrow shall be a feast to the Eternal, so that they should bring offerings to the Proper Name of G-d upon the altar which he built to His Name, and that they should not build altars to the shameful thing, and that their intent in the offerings should be [to none] save unto the Eternal only. It is possible that Aaron said, Tomorrow [shall be a feast], in order to delay them, thinking that perhaps Moses would come in the meantime and they would abandon the calf. But they rose up early in the morning and offered burnt-offerings, and brought peace-offerings. Now Scripture does not say “and they offered burnt-offerings to it, and brought peace-offerings to it.” The reason for that is that there were some people amongst them who intended them to be for the Name of the Holy One, blessed be He, as Aaron had said, but some of them became corrupted and sacrificed them to the calf. It is with reference to this latter group that the Holy One, blessed be He, said to Moses, they have worshipped it, and have sacrificed unto it, for it is they who were the sinners. And even if it was perhaps Aaron who performed the sacrifical rites, Scripture used an indefinite expression — saying, they offered burnt-offerings and brought peace-offerings — in order to suggest that Aaron’s intention was directed towards the Name of the Eternal, whilst they set their mind towards the calf which they had made, and thus the owners [of the sacrifices] invalidated them.