This is because the preposition "from" is used to indicate the origin or source of something, while the preposition "by" is used to indicate the agent or doer of an action. In the case of a book, the author is the source or origin of the book, while the publisher is the agent or doer of the action of publishing the book.