Odysseus clearly tells his men Circe's instructions about the taboo of eating the cattle of the sun god on the island of Thrinacia.
“But come, all of you now must swear me an oath of the strongest:
if somehow we should find some herd of his cattle or mighty
flock of his sheep, no man in the evil recklessness will
slaughter a cow or a sheep, not one of them: rather in quiet
ease eat only the victuals that deathless Circe provided. (XII, 297-302)
When the men do give into their greed and hunger Odysseus rebukes them, but the cattle are already slaughtered and the damage has been done. For whatever reason (possibly because Odysseus has been to the underworld and knows the consequences of impiety, or perhaps because he knows firsthand about the wrath of Poseidon after he killed his offspring the Cyclops ) Odysseus obeys Circe’s command and his men do not. Odysseus’s crew has to take the consequences, however, because after leaving Thrinacia there is a terrible storm in which every man is killed. Odysseus survives the shipwreck by clinging to wreckage, but not one other soul is saved. This story of Odysseus is an example of the precarious safety of the pious man among the impious – a theme common to Homer’s poetry and other ancient literature (compare to the story of Moses, the Israelites, and the golden calf in Exodus).
Source: Homer, The Odyssey. Rodney Merrill, trans. Ann Arbor: University of Michigan Press, 2006.