I'm fascinated by the fact that your GW didn't want credit.
Ghostwriting is essentially giving up all rights to your work and that means putting it out of your control.
It could be as simple as not wanting to compete with yourself. If someone pays you to write a book for them where they will own all the rights, if your name is on it, that book will come up in searches on your name. If someone buys that book, you get nothing because you already got paid. Maybe the person that bought it is an exceptional marketer, so 9 out of 10 Bill Hiatt books sold are that one you wrote for him. So, 9 out of 10 times, you're missing out on a book sale.
Or, if you write about children's books and someone pays you to write a book that would be inappropriate for children, you probably wouldn't want to risk your readers buying that book by mistake.
Or, let's say you wrote a book for a celebrity but, instead of ghostwriting it, you insisted on at least being credited as a co-writer. And then let's say the celebrity goes off the deep-end and does something horrific. You might not want to be forever associated with that person even if you had, and especially if you had, nothing to do with the horrific thing they did.
Or, let's say you wrote an article about the history of mince pie and how to prepare it. And it's to be published under your name. And let's say the buyer puts it on a website catering to cannibals and they also have instructions on how to render suet from children to use in mince pie. You probably would not want to be associated with that.
Plenty of reasons a ghostwriter might not want their name attached to something they wrote.