Humans quite naturally tend to think of their relationship to a god in child-to-parent terms, an outgrowth not only from their impressionable early years but also from their general sense of hopelessness in being able to control their environment. They remain, to a certain extent, a child always, the child within masked by the face of adulthood but inwardly looking to a parent to rescue them or guide them. The concept of a god as something larger and more powerful than the self, who makes things happen, begins in the helpless babe who finds himself cared for whether he asks for it or not, but mostly when he fusses. The concept of prayer is born - I ask and most of the time I receive. Molding the infant's behavior to meet the expectations of the family or social group begins early, with a sharp verbal or physical reprimand when the babe exhibits the wrong behavior. The concept of a punishing god is born.
A careful analysis of the organized religions in human society reveals the child's view toward a parent in almost every aspect. Parents expect the child to contribute to the upkeep around the home by doing chores or handing over their earnings to the parents, and organized religions expect no less from their members. Unquestioning obedience is another parental expectation, most often necessary as during a crisis there is no time to explain to the child why they must follow orders without hesitation. A child putting himself or others in danger must first follow orders and can only ask for an explanation later, if at all. Organized religions take great advantage of this early training, parsing out rules and commandments supposedly coming from a god who cannot be questioned. Rewards for good behavior in most human societies are simply the absence of punishment or privation - do well and you can continue to sleep under the parental roof and sit at the dinner table. Likewise, organized religions phrase the eventual rewards as a right to belong as well as avoidance of various punishments.
Conscious, intelligent life throughout the Universe develops the god concept in very similar ways. Any force outside of the control of the self, able to give life by providing sustenance or inclusion in the group or take away life through privation or expulsion or punishment is seen as a god. In human societies attempts to bribe or placate the god naturally follow along the lines of what worked with the parents. If parental rage dissipates when gifts are offered then the god is likewise offered gifts. If the parents are looking to punish a wrong-doer and the children assign one of their number to take this punishment as a scapegoat then likewise the god may be offered sacrificial scapegoats. Kings, wealthy patrons, and visitors from outer space all can fit into the god mold by virtue of their power to affect the lives of the humans in awe of them. For a god concept to emerge, there must also be a sense of helplessness on the part of the supplicant, a sense that they are powerless to affect the outcome except by offering bribes or scapegoats. In this regard, the giant hominoid visitors from the 12th Planet worked their way into many god myths, as they were exacting in their demands for obedience from their slaves, and as hominoids they were easily seen as extensions of a parent.