Tohu va bohu -- without form and void -- waste and destruction. Earth wasn't created this way. How did this chaos happen?

Tohu va bohu — without form and void — waste and destruction. Earth wasn’t created this way. How did this chaos happen?