What is the nature of gods in Greek mythology?
The gods of ancient Greece were of an entirely different nature to deities in the monotheistic faiths such as Christianity, Judaism and Islam. To a large extent, they were created out of the projection of a wide variety of human characteristics, both good and bad. The gods were an integral part of the stories ancient Greeks told each other; and as these stories were often based upon the innate fallibility of human nature, it was always inevitable that the gods would themselves display similar character traits. Just as human beings are often devious, cruel, violent, greedy, and stupid, so too were the immortals, albeit on a much larger scale.
In telling tales of their gods, the Greeks were not attempting in any way to construct a system of religion based upon absolute truth, such as Christianity, for example. The Greeks certainly believed in their gods; but the gods were always inextricably linked to the telling of stories, stories told primarily about human beings and their foibles. But these were never "just" stories; they were a crucial means for a primitive people to explain the world around them, a world often beset by plague, famine, war, and natural disaster. The gods of Olympus allowed the Greeks to make sense of an often harsh, chaotic world.
Although the gods live far away from humankind on top of Mount Olympus, as projections of human nature, they are never completely separate from mortals. They make regular appearances in the material world, taking on the shape of animals, humans, and inanimate objects. They constantly meddle and interfere in the lives of individuals, races, and whole nations alike, often to catastrophic effect. One only has to think of the brutally cynical behavior of the gods during the Trojan War in the Iliad to see an illustration of this. In fact, had the gods not intervened, that war would never have broken out in the first place. And having effectively started the war, the gods are keen to see it continue largely for their own pleasure. So just when it seems that the Trojans and the Achaeans might actually reach some kind of truce, down comes Athena, disguised as a Trojan, to stir things up again.
Even here, though, there is some method to what seems like utter madness. By attributing ultimate responsibility to the gods for a seemingly never-ending conflict, the Greeks were unconsciously providing themselves with an explanation for the permanence of war in their civilization, with all its terrible repercussions. In a way, the gods could be used as a convenient excuse to avoid asking difficult questions about certain aspects of Greek culture and society. If things were bad, if say the harvest had failed, or the city state had been invaded yet again, or a terrible, deadly plague was sweeping the land, then it was strangely comforting to think that this was just how the gods had decreed it.
Greek gods are not so much immoral as amoral. Immorality would imply that they somehow deviate from an established moral code. But they abide by no such set of values. They are the gods, after all; they live by their own rules, rules they devised for themselves and for their own benefit. It therefore made little sense for ancient Greeks to curse the gods for their cruel, unjust behavior (though many of them did). The gods, however gratuitously sadistic and unpleasant their behavior often appears to be, always act according to their own standards.
Despite their constant interactions with mortals, the gods are a race apart, and they know this. This sense of otherness and transendence inculcates a sense of overweening pride in the gods which must at all times be flattered by the mere mortals down below. The gods are insanely proud and jealous; they know what is their due and they intend to see that they get it. If any mortal should be foolish enough to defy or challenge the gods in any way, then woe betide them. Arachne, the gifted weaver, learned this lesson to her cost when she made the mistake of challenging Athena to a weaving contest. Accounts differ as to who actually won, but in the long run it was Arachne who lost out, cruelly transformed into a spider as punishment for her gross impertinence.
Even on the rare occasions when mortals are graciously admitted to the inner sanctum of Mount Olympus, they must still know their place. When Ixion is invited by Zeus to dine with the gods, he foolishly lusts after Hera. As well as tricking Ixion by getting him to have sex with a cloud in the form of Hera, Zeus orders Hermes to bind him to a fiery solar wheel which will spin for all eternity.
In both the examples just cited, the mortals concerned were undone by hubris, or overweening pride. Another way of saying this is to say that Arachne, Ixion, and countless others were trying to become more god-like, breaking their natural bounds to make an ill-judged grab for immortality, the sole preserve of the gods. In the pride of the gods, then, we are introduced to yet another essential function of the Greek pantheon. The gods serve to act as a salutary reminder of what can happen if humans get too arrogant, too conceited, too boastful, too proud. In other words, if they start acting just like the gods themselves.