Do you know when to use affect or effect? Wary or weary? A period or a semicolon? Does the period go inside the parentheses? Or outside? Even if you have a nearly-perfect grasp of grammar and can answer these questions, do you know what your personal writing quirks are so you can self-edit them?
An editor identifies and corrects these issues–if I don’t know the answer automatically, I know where to find it in a variety of reference books. The truth is, you are too close to your own writing to see the problems. You automatically know when you meant to have a pause in the sentence so you may not see the missing comma. You know what you mean, so you may not see an awkward sentence structure. You may love your description of a room, so you may not see how it slows down the narrative of your story. These are the things that will turn off a reader. An editor is your best defense against a bored or confused reader.
In an ideal world, every piece of writing–whether it’s a marketing brochure, a website, a dissertation or a book–would have a minimum of 3 editors: one to help you with the overall structure of your story (a developmental editor), one to help with the structure at a sentence or paragraph level (line or copyeditor), and at least one more to focus on the nitty-gritty stuff at the word and punctuation level (copyeditor or proofreader). In the real world with budget constraints, you should still try to have two editors: one to help with the overall structure of your story and one to clean up the grammar and awkward sentence structures.
I read a lot of self-published books in my free time. I love self-publishing! I can always tell when an author does not value the editing process, either the story pacing is off or there are typos scattered throughout the book. I am probably more sensitive to those issues than an average reader, but that doesn’t mean they will go unnoticed every time. There is at least one author who has interesting and exciting stories, but I’m disinclined to read any more of their books due to the typos on nearly every page of a trilogy (one of the examples in the first paragraph above came directly from this author’s books). You don’t want readers thinking the same about you.
Whether you’re self-publishing or going a more traditional route, make sure to budget some time and money to work fully through the editing process so that you can have the best book possible.