Editors are gatekeepers. The whole purpose of an editor in the publishing business is to weed out the bad and leave only the good. This is especially true in magazine publishing (online or in print). If you think that every story written is good, then you are sadly mistaken. Just because you have written something doesn't mean that it needs to be seen. Bad stories exist. That said, it should be acknowledged that editors don't always get it right; but that's the nature of the human condition.
Editors spruce up prose. They don't do it quite as much as the other kind of editor that you hire, but they do make good writing better. In book publishing, an editor does a hell of a lot of work, and most of the time the work they do is good work. I've seen manuscripts from before publication and after and can honestly say that the final product is almost always better than the original thing.
Editors make you into a better writer. Emphasis on better. They don't make you into the greatest writer ever, but they certainly teach you a few things. Ask anyone published by a major publisher or even a small press. Ask them if their editor taught them anything. They did, didn't they? I thought so.
Editors are dedicated to good books. They are not evil, but benevolent creatures with only one goal in mind: find and publish good books that consumers will like. They don't always get it right (but, hell, let's face it, writers don't either), but they put a hell of a lot of work and TLC into every book they edit. They want to put out good books. In fact, they have to. A string of horrible books that don't sell very well could spell certain doom for an editor; it's in their best interest to provide consumers with good products. And if you don't believe that, then ask an author published by a traditional press. Ask someone at Tor or Penguin whether or not their editors did a lot of work to produce a quality product. Did you ask? And? I thought so.
The thing is, some people are jaded against traditional publishing. Sometimes it's for good reason, and a lot of the time it's not. Editors are not useless entities. They serve a vital purpose in publishing, and writers need them (even good writers). Self-published writers need them too. Every sentence you write isn't gold. Sometimes a sentence is utter drivel. The problem is that writers don't always know that, and it can take a good editor to make them see it.
If I missed anything here, let me know. I'm learning a lot of the editing trade, so if there are things editors do that I've forgotten, leave a comment!
(This post is a preface to another post I have coming up. I'm trying to wrap my head around a string of paragraphs written elsewhere that I can't help staring at--not because they are interesting, but because what is being said is so ignorant and stupid that I can't help gawking at the words. Expect that soon.)