Collaborators can make money—sometimes a lot of money. Some writers agree to a one-time payment. Immediately I think of two collaborators, both of whom wrote for lump sums just below 100,000 dollars. Nice pay.
Others charge a specific amount for a page of finished writing or rack up costs according to the hours they work. These are examples of those who do flat-fee projects. That is, once they finish the book and get paid, they receive no more money, even if the book sells 15 million copies.
The other method, and the only one I now accept, is to work on a split- royalty of 50 percent. That means every time someone buys a copy of the book, I earn money.
One other attraction for collaborators is that it makes some writers feel special to be connected with a famous person. It seems to add to their stature as writers. Because we live in such a celebrity-conscious society, that makes sense.
My remarks aren't to condemn or condone that attitude, but only to say that's a big attraction for some.