From the Oxford English Dictionary:
One who prepares the literary work of another person, or number of persons for publication, by selecting, revising, and arranging the material; also, one who prepares an edition of any literary work.
The OED is more than just a place to define words–it also gives the literary history of words, explaining where each one first appeared and in what context. “Editor” also refers to the position at a publishing company, an office of the person who decides what gets published. It wasn’t always a “doing” job; sometimes it was “deciding” job. Editors didn’t check your grammar; they decided if your work got published at all. Today, editors often do both–massaging your words while making those executive decisions.
This kind of background is important to understand when thinking about words. It’s more than just what it means today. Words have baggage, geographical and cultural influences as well as long-term effects and derivatives.
I try to keep that in mind when editing. Yes, it’s about the rules of English and how it’s supposed to look. But it’s also about the writer’s vision, and the context of the words, and sometimes it’s better to break the “rules” in favor of the effect. Of course, you can only break the rules when you know what they are, so an editor is a handy reference guide to have around.