A friend of mine asked me, 20 years ago, the question of "Where did God come from?" As a agnostic Unitarian, he thought he'd poke some holes in my faith, for fun, but I took it as a legitimate question, also for fun.
I took over a full year to consider, contemplate, and analyze that question and matters as a whole before I came to a plausible theory, which I will now share with you.
Under this theory, in the beginning, there was nothing. There was no matter, no energy, no thought, no time, nothing. A complete and utter absence of everything.
Then came a thought, from nothing.
It was a simple thought. Even simpler than a baby we are all familiar with. Having no form, it couldn't 'do' anything, but it existed. This 'thought' was the earliest 'god' as we consider it.
This 'baby god' learned its environment of nothing, and then made something. There were no 'rules' at this time; no physics, no chemistry, so creation and destruction were simple: the thought imagined, and the nothing produced. This went on for as long as one can imagine, as not even time had yet to be created. It created whatever you might imagine a baby with unlimited power over its environment created, which sounds really trippy when you think about it. Probably pretty wild.
Eventually, this 'baby god' created something independent of itself. Something that could think independently. Perhaps it was lonely, or bored, or it was an accident, but that thought created new, independent thoughts. Some of these thoughts were cooperative with the 'baby god', some were not, and some were even antagonistic. The 'baby god' treated them in a manner which we should all recognize: it punished the antagonists, it ignored those who were not cooperative, and it encouraged those that were cooperative. In Christianity, I expect these would be the Heavenly Host (angels, including Lucifer). Other religions have equivalencies: gods and demigods, or many gods, but their origins are all the same.
At this point, this 'baby god' has matured a bit. It is a 'toddler god' now, and it wants to make something. It is tired of creating and destroying toys and decides that it wants to make something a bit more permanent, so it creates a universe (or at least something we might consider a universe). More than likely, the universes it creates are still temporary, but more permanent than its original attempts because it has gotten better at making universes. It learns from each failure and, being timeless and unlimited in power, just keeps trying new things. The number of universes it might have created, or destroyed, cannot be fathomed, and might be innumerable. Eventually, of import to us, it creates our universe.
At the point of the creation of our universe, maturity-wise, I would call it an 'adolescent god', as it is pretty sure it knows what it is doing and cannot admit to itself when it is wrong. The stories of vengeful gods, smiting and flooding, temperamental and capricious, yeah, those were this 'adolescent god' interacting with we mortals, and learning from its mistakes, and we being both the benefactors and victims of those mistakes.
At this precise moment in time, I believe the 'adolescent god' has either moved its attention to a new universe, or has matured to the point where it is now an 'adult god', and recognizes that we (life in general, not humanity specifically), as its children, need to be left to struggle and survive and learn on our own, perhaps with advice every now and then given as subtly as possible. Regardless of cause, it no longer takes as active a role in our lives, preferring to let us try things on our own, and succeed and fail on our own skills.
That was my final conclusion on where God came from, and how we got to where we are right now. Feel free to elaborate, discuss, and criticize. I spent a year thinking about it and would welcome other ideas. My friend had no way to refute this idea so I guess I had my fun after all. :)