One of the most common questions I receive from fellow freelancers is whether or not they should ghostwrite for clients.
For many writers, it goes sorely against the grain to let someone else take the credit for their work. With this in mind, it's not much of a surprise that a number of them ask me about the ethics of ghostwriting.
Deciding to ghostwrite falls into a gray area for many. On the one hand, you are agreeing to provide a product or service to someone, and they should be able to use it as they like. However, we also place a premium in our society on doing your own work. So it seems strange that you would be asked to ghostwrite and let someone else claim credit for your work.
However, not everyone feels comfortable writing their own stuff. As long as you and the client are both clear about who should receive the byline, it's really not much of an issue — if you don't mind yielding the glory. It can also make sense to charge a little extra, since part of the point of being a freelancer is to receive visibility.
Of course, not everyone wants to ghostwrite. You don't have to if it's not your thing.