Some editors do almost everything, others have more limited briefs.
Sometimes editing a book can take almost as much effort as writing the book, and involve a whole team of experts.
The degree to which a book might be edited can depend upon how financially viable it is to do that work. At the end of the day, publishing a book is a business; and if the book does not generate sufficient income; it may not be viable to undertake a high level of editing.