It isn't scientific cosmology. It's myth. You know how most creation myths start with a big battle between gods and monsters?
"In the beginning, Elohim (many gods) bārā (not created, but cut out) the heavens and the earth. And the earth was tōhū and bōhū, and the darkness was on the surface of the tehōm."
Tehōm is the primordial ocean, space or Absolute. Tōhū and bōhū, mistranslated "without form and void," connoted the monstrous and the violent. As Professor Jeremias, the German orientalist, says: "There can be no doubt that tōhū is connected with Ti(h)amat and bōhū with Behemoth. Bōhū is the equivalent of the the Babylonian Apsu, the male mate of Tiamat."
(Deceptions and Myths of the Bible by Lloyd M. Graham)