In the Iliad, the heroic code is seen through the bond of friendship, the customs of hospitality, and the concept of loyalty and courage of battle.
The belief in hospitality customs carried great weight in the time of the Iliad. Paris kidnaps Menelaus' wife Helen while Menelaus is showing acts of kindness and hospitality to Paris. Paris commits a great offense by disregarding Menelaus' hospitality:
Paris visits Menelaus in Sparta and abducts Helen, taking her back to Troy with him, seemingly with her active cooperation. Paris also takes a large part of Menelaus’ fortune. This was a serious breach of the laws of hospitality, which held that guests and hosts owed very specific obligations to each other. In particular, the male guest was obligated to respect the property and wife of his host as he would his own.
Paris' total disrespect to Menelaus causes the Trojan War.
During the Trojan War, various heroes showed significant courage and loyalty in battle. Achilles is a great hero in the Trojan War. However, Achilles' tragic flaw causes him to break loyalty with the Greeks. Achilles allows his pride and anger at Agamemnon to influence his decision to stop fighting the Trojans. When Achilles stops fighting, the Greeks begin losing. They suffer many losses of Greek soldiers.
Because of an argument between Achilles and Agamemnon, Achilles decides to stop fighting the Trojans. Later on, Patroclus is killed by Hector. Achilles and Patroclus were great friends. When Hector kills Patroclus, Achilles avenges his death by killing Hector. It is the bond of friendship that causes Achilles to reenter the Trojan War. Truly, the bond of friendship was of great importance during the time of the Iliad.
No doubt, the heroic code was an important concept during the time of the Iliad. If characters broke the heroic code, there were serious consequences. Also, it was during this time that it meant everything to a soldier to be considered heroic. Even if it meant dying, the hero lived by the honorable code. He was determined to live up to the high ethical standards associated with the heroic code.