In the beginning God created the heavens (plural) and the earth.
From other scriptures we know that the third heaven (the heaven of heavens) is God's dwelling place. The first heavens are visible. The second heavens, therefore, are invisible but not God's primary dwelling places.
After the statement regarding the beginning, the earth is said to be bohu and tohu, which I understand to mean 'inglorious' and 'markedly so'. The translation needs considerable explanation and comparison with other scriptures.
Then there is a deep. And darkness is on the face of it. Thus the volume of it cannot be discerned : neither its content, nor its extent in depth. It is obscure.
Then the Spirit of God 'hovered' or 'fluttered' upon the face of the waters. This conveys an anxious desire to alight, but an energetic reluctance to do so.
Later, a serpentine spirit appears and tragedy ensues.
All of this points to something happening in the second heavens, before the tragedy occurred on earth. And if the obscurity of darkness occurred immediately the heavens were created (and before the earth was founded) then this would explain the state of earth being inglorious and markedly so.
Something had gone wrong in creation.
And as result, 'sin entered into the world' Romans 5:12.
The creation had a liability. Just by creating intelligent, sentient life, there was a liability. In order to create independently, intelligent beings, there is the liability of what independent creatures will do.
And we see the results.
Thus, redemption becomes an absolute necessity.
Immediately, upon the creation of man and woman, who can be influenced by created spirit, there is the absolute necessity of a redemptive sacrifice.