Paging Freeper lawyers to answer this question.
Legally too - once you sell the CDs, the license to that music goes with the CDs to the new owner. You never really own the music, just a license to listen to it at your convenience, and the license stays with the disc. That's why, if you run over your discs with a steamroller, you have to buy new CDs instead of getting free replacements - you don't own the music, just a piece of plastic and a license to listen. Sell them, and the buyer now has a license to listen to the music, and you don't any more.