Edwin Judge explains that ethical behaviour had little to do with worship of the Greek gods.
Gods did not have any standard of action or even expectation for how you would behave. This, I think, in the case of the Greeks, was because the gods were themselves understood in very human terms. It was assumed that they would act as people acted – that gods would be angry with you, or would favour you. They would even cheat and that kind of thing. So that it was not as though the gods, as they understood them, were setting new standards; they, if you like, exemplified the de facto standards under which the community worked.