(The good news is that it's not really expensive to pay someone to do if you don't really need the services of a full-blown editor who is advising on structure, flow, etc.)
Agreed, but it's easy to hire a freelance copy editor. In fact, that's often what traditional publishers do too.
IMO, it's not something you can rely on software for although software catches a lot of course. The one time I didn't do it worked out OK. But I had a co-author and we had sufficiently reworked the (somewhat shorter) book enough times over a fairly long period that I decided it had had enough fresh eyes on it to stand on its own.
And of course publishers aren't perfect either. I've found a few typos in my last book which did go through a traditional publisher even though I also proofread it pretty carefully. (One mistake was in front matter which I added fairly late on which makes me suspect there would have been a lot more errors in the book if I didn't check it carefully myself.)
I had declined both of them as they only offered 10% royalty rates.
I didn't have to pay for editing. I did everything myself: writing, diagrams, proofreading, marketing.
In fact, I decided to self-publish it after reading this article from Antonio Goncalves about his Java EE 7 book:
https://antoniogoncalves.org/2014/09/16/the-uncensored-java-...