This is a question many have asked and wondered about, especially when your life seems to have no meaning, when you seem to have no power to really control the direction of your life and events appear to be happening to you rather than being initiated by you. It is so easy to blame disappointments and failures on God, the Universe or others than yourself, while all the while taking great pride in your successes and accomplishments.
In many cases it never occurs to us that we create our own reality and the mass reality of the world we live in. Nothing ever happens to us that we ourselves do not create in one way or another. By that I mean, that the processes by which reality is created are not at this time consciously known, but they are well defined and are no mystery as they have been given to us again and again over the centuries. Creation is a by-product of life itself and we exude objects and events almost if by a natural osmosis as natural as breathing. Once we understand that everything that touches our life, in a very real way is the exterior result of inner subjective work that we initiated with our thoughts that follow our beliefs.
There is an inner process whereby your inner self listens to the exterior conscious mind as it accesses the outer environment which cannot be done by the inner self. The ego consciousness, outer self, then decides what it needs, falling within the limitations of beliefs and the inner self puts the processes in motion to drive inner energy into matter based objects and events. And although it may not seem so, but events are also particularized as are objects, only in a different way. You would be very close to the truth if you said that objects and events begin to coagulate from thought then gain mass and durability through a process whereby consciousness asserts itself through the auspices of the flesh at a precise intersection of time and space.
Your reality that affects both your private life and that of your contemporaries is an almost magical result of inner comprehensions and channeling of vast energy into physical form in line with your beliefs, emotions, desire and expectations. Your beliefs then act as directors of those energies, channeling them into objects and events that you believe are possible. In that respect they insure that nothing will come into your life that you do not believe in. Conversely speaking that means that you can have anything that falls within your belief system, within certain limitations. It also means if you have constricted beliefs, you limit to a great extent your own personal experience. It follows therefore, that it is in your best interest to try and examine and expand limited beliefs.
The reason I am going in this seemingly round-about way of getting to the point is that we have been given the power of the gods to be co-creators of our universe, world and private lives. For this discussion there is no need to go more deeply into this creative process other than to say that we create unconsciously and at this point in our evolution, it takes time for these unconscious processes to break through from inner reality into physical representations that we can perceive and use. We are here to learn how to create responsibly.
Our civilization at this time would not last a day if our deep held beliefs were actualized instantly, lets say as they are in our dreams. A dream object is actual and has form just as our physical objects, they are just put together differently and do not seem to have durability in time as our objects do. But they are real and they are constructed immediately. It is what we are heading to.
Yes, at this time in our evolution, there is a time lapse between original thought that falls within your belief system, but if given enough impetus though desire, duration of thought and true expectation, anything is possible and all thoughts will materialize somewhere.
If we were to visit a planet somewhere in our universe and found living beings there who we could speak with, they might ask us to tell them about our God. We would say, that He created the world, but you are a co-creator of your world. We would describe our God as living forever, but you live forever and don't even trust that great inner knowledge that lies deep within your mental genes.
You Were, before our world existed and you will still Be when this world disappears. You can die, but the you who is the real you, can never perish but live again and again. Identity exists before the body is born and exists after it is discarded. The you changes and grows but never diminishes, is dissipated or extinguished. Once formed, Consciousness is forever and it is always getting better, quality wise.
Now, you might wonder why I approached the original question in such a long winded explanation about creation? Because you are here to create, your life, your environment, your world and to impress this world with your own imprint without doing harm to others. Things do NOT happen to you, they happen because of you. You have the power to change the present situation, no matter how dire it may see. There is NO pre-destination. All lines of probability are open and ready to be actualized, but you must open the door. The only real way to change present lacks is to change how you think about them. Period!
You chose to live this life and you had a reason, certain challenges to confront and learn from. If you want to know why you are here, look back over your life and you will find a pattern of "certain reoccurring challenges" that have always been with you in varying degrees. This is the realm of challenge that you chose to deal with in this lifetime, but you did not choose them to defeat you. When you finally begin to realize that the POWER is in the NOW, and that events do not happen to you, but by you, you can then formulate a plan of changing beliefs, expanding old closed off areas in the mind, opening new avenues for expression within new belief structures and begin changing what you don't like.
Beyond and above that, there is no mandate from a obsessive, angry, controlling God to do or be anything. Live life and learn, become more. Live in a state of wonder and remember you are a part of nature, creating dreams and natural environments as easily as you breath. You came into this life in a state of Grace and there is nothing you can possibly do to keep from leaving it in the same state. You are intimately connected with everything you perceive, so treat everything with care and respect and do no intentional harm.
There is no final punishment, only a look back before moving on to another adventure, and you have had many adventures before. This probably was not your first and cannot be your last.