Authors have many tasks. They acquire expertise in a given subject, come up with an idea, do research about the idea, write the manuscript on deadline, provide all bibliographical information, agree to an offer, produce an index (if desired), help market the book, and make any revisions for future editions. They also commit to regular communication with the agent.
Before authors sit down to write, ideally they should know (1) whether there is a market for the idea, (2) whether they will be seen as an authority on the topic, and (3) whether they have the platform to strongly promote the book upon publication.
Publishers look for evidence of all three. Literary agents can be very helpful in answering these questions and helping to craft a book idea before authors commit the first word to paper.