“In the beginning God created the heavens and the earth.” (Genesis, 1:1)
Why?
The Bible doesn’t say why, or even how or when the universe was created. Other religions claim god or the gods made the cosmos out of chaos, an egg, an ocean, a dream, the body parts of a dead god—or even, as the ancient Egyptians claimed, that the god Atum masturbated the world into existence. Many believers have argued that the meaning of the cosmos and life itself can only be found in a god. It may turn out instead that creation is meaningless even if there is a god, because god had no good reason to create it. It all depends on which idea of god we are considering and whether that idea is consistent with the existence of the cosmos.