Rabbi Bannaah said: Why was "that it was good" not said on the second day? Because the fire of Gehinnom was created on it, and the hollow of Gehinnom was created before the world was created. And our own fire arose in thought to be created on Sabbath eve but was not created until the going out of the Sabbath. As it was taught: two things arose in thought to be created on Sabbath eve but were not created until the going out of the Sabbath. And at the going out of the Sabbath the Holy One, blessed be He, placed understanding into Adam, the first man, resembling a pattern from above, and he brought two stones and ground them one against the other and fire came out of them; and he brought two animals and mated one with the other and a mule came out of them.
Two Things Conceived on Sabbath Eve and Made at Its Close
Yalkut Shimoni on Torah 5:8
אָמַר רַבִּי בַּנָּאָה, מִפְּנֵי מָה לֹא נֶאֱמַר כִּי טוֹב בַּשֵּׁנִי, מִפְּנֵי שֶׁנִּבְרָא בּוֹ אוֹר שֶׁל גֵּיהִנֹּם, וַחֲלָלָהּ שֶׁל גֵּיהִנּוֹם נִבְרָא קוֹדֵם שֶׁנִּבְרָא הָעוֹלָם. וְאוֹר דִּידָן עָלָה בַּמַּחֲשָׁבָה לִבָּרְאוֹת בְּעֶרֶב שַׁבָּת וְלֹא אִיבְרִי עַד מוֹצָאֵי שַׁבָּת. דְּתַנְיָא, שְׁנֵי דְּבָרִים עָלוּ בַּמַּחֲשָׁבָה לְהִבָּרְאוֹת עֶרֶב שַׁבָּת וְלֹא נִבְרְאוּ עַד מוֹצָאֵי שַׁבָּת. וּבְמוֹצָאֵי שַׁבָּת נָתַן הַקָּדוֹשׁ בָּרוּךְ הוּא בִּינָה בָּאָדָם הָרִאשׁוֹן מֵעֵין דֻגְמָא שֶׁל מַעֲלָה, וְהֵבִיא שְׁנֵי אֲבָנִים וּטְחָנָן זֶה בָּזֶה וְיָצָא מֵהֶן אוֹר וְהֵבִיא שְׁתֵּי בְּהֵמוֹת וְהִרְכִּיב זֶה עַל זֶה וְיָצָא מֵהֶן פֶּרֶד.