Another way of looking at it is - if you buy the CD/music, then artist gets their money (hopefully) but whether you keep it or sell it, the point is moot to both the artist and the company have gotten their dough from you because whether you sell it or not will not make a difference to either the company or the artist.
On the other hand, even though it is perfectly legal to sell the copy second-hand, that would be "less fruitful" to both the company and the artist because that would potentially be one less sale.