You would think that a war story with vivid descriptions of death and bloodshed would have an anti-war message. But this is most certainly not the case with The Iliad.
Homer was not at all against this war or any other war. In fact, one of the major themes of the epic is how heroic and glorious war is.
Even so, he did not shrink from portraying the horrors of war. In my opinion, this is done in part to reinforce his point. If war were easy and risk-free, excellence in war would be pointless. But because war is so terrible, it is glorious and honorable to be a great warrior.
So, the scenes of carnage are there to show us what the stakes are -- what the heroes have to lose. This allows us to realize how glorious their victories really are (to Homer).
Homer's world is very different than our world. This might be an obvious statement, but it is a necessary point to make. In Homer's world, certain characteristics were valued like courage, honor, military prowess, fame and victory. The story of why Achilles came to Troy might be illustrative of this. Before Achilles came to Troy there was a prophecy. If he came to Troy, he would die, but be famously remembered. But if he stayed at home he would have a long and full life. Achilles chose to come to Troy and fight. This shows what was valued in this society.