Yet Homer (if such a person actually existed) lived in a completely different era. Human settlements were few and far between. Road from one town to another was long, arduous and often mortally dangerous. Communication between distant lands was weak, primitive and erratic, which meant that travelers were often the only source of news and stories about faraway locations. People living in their familiar surroundings were extremely vulnerable – and the law or custom of hospitality was the only thing that served as their protection away from home. Whether you followed or not followed this law was one of the most important things that differentiated a civilized person from a barbarian – if you were kind to strangers, strangers were more likely to visit you again, bringing news and goods to trade. And you were more likely to be paid in kind in case you ever got far away from home yourself.
This is why hospitality is treated with that great an attention in The Odyssey, which is seen especially clearly in case of Polyphemus, the Cyclops in whose cave Odyssey and his companions stopped to pass a night. Polyphemus doesn’t simply break the law of hospitality – he openly and smugly dismisses it and scoffs at the gods who enforce it. It is only logical that Polyphemus is described as a beastly thing closer to wild animals than to people – he is not simply barbaric, he is subhuman.
In fact, if you take a closer look, it is his impious behavior and lack of respect towards the law of hospitality that is most frowned upon in The Odyssey and not his cruel treatment of Odyssey and his men per se. The world described by Homer shows no lack of grisly murders, and Polyphemus killing and eating several men falls short even of some things done by Odyssey himself (let’s not forget that he was instrumental in capture of Troy and subsequent slaughter of its inhabitants, for example).
It is this impiety that brings Polyphemus to the brutal punishment at the hands of Odysseus, not the murder. And the status of hospitality in the society of that time makes sure that readers unanimously agree that this punishment is sanctioned by gods and not just an act of a man angry at somebody who killed his friends – which serves as an excellent example of values dissonance between now and then.