How can a sword be evil? Well, give it an owner whose title is "last of the Forsworn" and you're pretty much set. In the service of the wretched King Galbatorix, we can only shudder to think about what terrible deeds were committed by that sword. Still, after Brom kills Morzan, he takes the sword for himself, eventually passing it on to Eragon.
This sword seriously gets around.
Practically speaking, Eragon uses Zar'roc because he doesn't have another sword to fight with. As we know, he's also not swimming in cash and can't really buy another one. So this cursed sword is all he has. And it's not winning him any popularity contests, especially when he visits the Varden and the dwarf King Hrothgar: "I see that you carry an enemy's sword […] It does not please me to see this weapon" (55.31). So why would Eragon keep using it?
Maybe it has something to do with Saphira's advice. She tells Eragon
Zar'roc may have a bloody history, but that should not shape your actions. Forge a new history for it, and carry it with pride. (55.3)
Whoa. The sword almost becomes a symbol of Eragon's free will. Can he use his powers to make a change in the world? Or will he be doomed to repeat the events of the past? Dun dun dun…
When Eragon slays Durza with Zar'roc, we have our answer. Once used for evil, now Zar'roc is used for good. Eragon's is able to forge his own path in the world, to be his own person, and, ultimately, to create his own destiny. [Cue movie trailer music.]