I like the Hindu answer to this.
In the Hindu cosmology the universe has no beginning or end, but does start over after a period known as an aeon.
The Hindu answer is something similar to this analogy -
Imagine you own a mega casino in Las Vegas. You own everything inside the casino. All the casino's money ("the house") is your money. Gambling would get rather boring rather quick.
So no imagine you are able to forget you own the casino. You think you are just a patron there to gamble. No the stakes seem real to you. The excitement of gambling returns.
In Hinduism, God is everything and everyone. Only everyone has forgotten that. The point is to try to remember. It is a game. It is a theatrical play.