Presumably, the same way there will be in the renewed creation:
"They will need no light of lamp or sun, for the Lord God will be their light, and they will reign forever and ever." Revelation 22:5
Jesus is The Light of the World, the one who shines out from his Father, the one who said "Let there be light". Having established light in the dark, he then makes the sun and moon, appointed to rule on his behalf, reflecting His light - overwhelmingly in the day, and reflecting that in the night so that the light always shines and the darkness never quite wins (just as the church reflects Christ in the world today)... so too humanity is appointed to have dominion on behalf of Christ, imaging his benevolent rule. Shadows of the life of God.
Why create this way? Because this is what he would do in the pitch darkness of the human heart. As in salvation, so in creation - because this is who the Triune God is. This is how the universe had to be because of who God is. And ok I don't quite know how the physics of all this works, but Scripture is internally coherent enough, it's just very different to how people think when they presuppose that the Triune God doesn't exist.