To write a text that will be attributed to another person.
There are a number of reasons why people employ ghostwriters to write books on their behalf.
First, if a popular author cannot meet the market demand for their books, they or their publisher may hire a ghostwriter to write additional books under the author's name, usually in imitation of their style.
Second, some long-running series credit all books to a single pseudonym, which in fact represents a series of ghostwriters adhering to a specific style.
Third, a person who has unique expertise or experience but lacks writing ability may hire a ghostwriter to collaborate with them to write a book.
Finally, a person seeking to establish their credibility in a particular field or social sphere may hire a ghostwriter to write a book (with or without their direct input).