I recently read a story where an artist sold a recording for a flat fee, and then the song went on to become hugely popular, but the artist didn’t receive any royalties. It’s a familiar story of exploitation, especially of Black artists who systematically receive less credit than they are due in American music.
However, I was distracted by an alternative interpretation that came to mind. To some extent, the rights to royalties for a song is essentially a lottery ticket. Song popularity follows a power law distribution (I presume, based on how these things usually work), so that a few songs become extremely successful while the vast majority remain in obscurity. It makes sense to want to sell your lottery ticket–provided that you get a fair price for it. If you have a losing ticket–as most people do–then selling that losing ticket is a way to still make money.