Two big assets: distance and business sense.
First, distance. An editor is (or should be) someone who is removed from emotional attachment to a work. The editor acts as an enlightened reader, reacting to what he/she sees and noting places where more, less, or better is needed. Editors are a bit like teachers, who work with a large number of "children" and therefore can better judge your "child's" suitability for society.
Second, business sense. Editors need to keep their fingers on the pulse of the industry. A good editor knows, as well as anyone can in this crazy business, what will sell. Do they get it wrong sometimes? Of course. But they know what sold last month and last year and they know how much of a particular type is out there, how much is coming through their hands. They know that even if they love your current submission, there are twelve like it in the pipeline, and people may well be tired of, oh, say, VAMPIRES, by next year.
They aren't all good at what they choose to do. But there are lots of not-so-good writers out there, too.