In Book 9 of Homer's Odyssey, Odysseus and his crew arrive in the land of the Cyclopes. One of the major themes of this epic is xenia ("hospitality"). Throughout his journey home and even after Odysseus arrives home, he will test his hospitality of those he encounters. Sometimes that hospitality will be good, as in the case of his audience in Book 9, the king and queen of Phaeacia; in other cases, that hospitality will fail, as in the case of the Cyclops Polyphemus.
In Odyssey 9, Odysseus comments on the lawless behavior of the Cyclopes for at least three reasons. On one level, it serves to remind his current hosts, Alcinous and Arete, of their own obligation to treat him in a hospitable fashion. On another level, Odysseus' comment on the Cyclopes' savagery serves as foreshadowing. Odysseus' audience, both inside the poem and outside the poem, should take this comment as a major hint that Odysseus will not be treated in a hospitable way by the Cyclopes. On a third level, Odysseus' comment on the lawless Cyclopes justifies his blinding of the Cyclops Polyphemus.
In the end, Odysseus' comments on the lawlessness of the Cyclopes are effective. They prepare the audience for Polyphemus' savagery of the Cyclops and justify Odysseus' blinding of the Cyclops. Odysseus also remind his Phaeacian hosts of their duty to be good hosts, a duty which they fulfill because they take Odysseus back to his native land.