Ghostwriting is generally looked down upon. People were not happy when it was alleged that Top Clancy didn’t actually write all of his novels. Rapper/icon Drake got a lot of flak from his ghostwritten lines for some songs on his album.
In other cases people seem to be fine with it. Everyone knows that the president doesn’t write his own speeches, and nobody cares. Celebrity memoirs are also typically ghostwritten, something people have just learned to accept.
One could make the argument that they feel that ghostwriting is wrong because they believe it is a form of fraud. They were disappointed because they thought they were buying one thing but they received another, like an officially licensed knock-off. However, I don’t consider ghostwriting to be fraud. I consider it an extension of editing and translating. It is ok for the same reasons that speechwriting is ok.
Editors make all sorts of changes to a piece of writing, but because the work is still approved by the author before publication, it is not considered as plagiarism. The editor improves the writing to make it more readable for the audience. Typically the editor isn’t credited by name outside of maybe the acknowledgments section.
Translating is similar; the translator’s job is to express the ideas of the author using idioms and phrasing that could not have come up with on their own. Translators are usually credited, but usually not on the front cover.
Even though the president didn’t write his speech, he is still endorsing the ideas in the speech. No politician can say something controversial then avoid responsibility by blaming the speechwriter. The speechwriter is taking in what the president wants to say and puts it in a more organized form factor designed to be heard by a mass audience. She essentially acts as a more involved editor. Instead of fixing a document that the president wrote, she directly writes the document based on the his needs.
Ghostwriting is the same. Ghostwriters for celebrities will take the celebrity’s disorganized thoughts and turn it into something readable. The writing may the ghostwriter’s, but the actual ideas are the celebrity’s.
Tom Clancy’s ghostwritten novels are all in the style of Tom Clancy and use his copyrighted characters. Those novels couldn’t have been published without his approval anyway, and it makes good marketing sense to just attach his name onto them. In effect Clancy is just saying, “this is basically the same thing as I would have written, so I’ll just buy it ready-made and resell it.”
What is the difference between Drake, who’s songwriting team is kept secret, and Micheal Jackson, who’s open about the fact that his songs are a result of collaboration? Many believe that the ghostwriting makes the music less “authentic,” and that the personality of the music is lost when written by someone else. A lot of this comes down to subjective preference, and people who really want to listen to rappers who write their own music have an endless sea to choose from. However, I do believe that these concerns are a little overblown, as the basic song structure is still written by Drake. The songs must ultimately fit his icon and personality. Ghostwriters can help him find words to rhyme with and whatnot, but they cannot actually think up the core content of his songs. Only Drake can do that.
I will end with a final example: The Federalist Papers. Hamilton, Jay and Madison all wrote these under the name “Publius.” The first 9 were written by Hamilton and Jay. The 10th was written by Madison. Was Federalist 10 a fraudulent good? Federalist 10 was written in the same vein as the first 9, and presented the views of all three authors. What good would it have been for Hamilton and Jay to produce their own Federalist 10 if they already 100% agree with Madison’s? Some will argue that they could have endorsed it without sharing the name, but ultimately this is distinction without difference. Federalist 10 having a different author would also have caused confusion, and ultimately the reader is probably better off just receiving it as they have received the others.
There were several Federalist Papers which had unclear authorship afterwards. After Hamilton died in 1804, a list was came out which claimed that he had written a large majority of the Papers. Madison had disputed the list, and said that he had written 49–58 and 62–63. Since that time people have used modern analysis techniques to find the true authors, but in any case it seems too extreme to make accusations of fraud when the end product is indistinguishable under normal conditions anyway.
Source: Consultation with professor (I got the thesis, president example, Tom Clancy example, and Federalist Paper examples from him. He basically ghostwrote most of this post), Her Campus article on Ghostwriting, Wikipedia article on Tom Clancy
Updated 2020-06-06 (small edits)