If God had created the universe perfect, you would have nothing to do, nowhere to go, and nowhere to avoid going.
As it is, God created an imperfect world, so you can have the ability to be a good person, looking towards an eternity with all the other good out there, avoiding an eternity of nothing but death and suffering.