If you plan to submit your manuscript to traditional publishers, you should eliminate all possible errors in advance. Manuscript submissions may be rejected for the simplest of reasons. Likewise, you could be unknowingly committing major errors. You have only one opportunity to make a first impression and a professional edit will maximize the impression you make.
If you plan to self-publish, you’ll want your printed book to compare favorably with traditionally published books, all of which are subjected to thorough edits; that’s what assures consistent quality from one book to the next. To maximize your self-publication experience, have your manuscript professionally edited and avoid potential embarrassment by correcting all errors prior to printing.