To first-time readers, the ending of the Iliad is probably one of the most mysterious aspects of the poem. Not only does it focus on the funeral of Hektor, the hero's enemy, but it doesn't tell us anything about famous and cool stuff like the wooden horse or the fall of Troy. What's the deal?
As you might expect, there's no single answer to this question (that's part of what makes the poem awesome), but there are a few that stand out. First of all, it's important to remember that the Iliad isn't the story of the whole Trojan War, but only of a few weeks toward the end of it. During those weeks, the focus is squarely on the figure of Achilleus, the greatest warrior of the Achaians. Even more specifically, the focus is on the anger of Achilleus... and its consequences.
When Achilleus gives Hektor's body back to the Trojans for proper burial, the cycle of his anger is complete. At the same time, we know through some pretty heavy foreshadowing that Achilleus is going to die soon, so we feel that the story of his life is complete too—even if we don't get to see every detail of how it plays out.
Of course, there are some deeper thematic reasons for ending with the funeral of Hektor too—stuff about our common humanity transcending our differences, man—but we don't want to spoil the fun of figuring these out for yourself.