CD is the VHS that is now replaced by DVD(putting digital vs. analog aside). If you want to compare, barely anybody will buy the VHS anymore so it is what it is just taking up space with the other very simple and higher quality solutions available today.
We could argue the legal issues are what they are all day and night, but does that mean the 1000 free vinyls I got in mint condition at one point was illegal too? Or just paying a Dollar for a Vinyl is illegal as well?
Copies are everywhere period, but the bottom line only reason CD is "Dead" so to speak or at the end of its days is not my opinion or anyone else, its simply that we can all wake up tomorrow and have easy replacement formats that work as or more efficiently in the ultimate scheme of things, just like flat panel TV's vs. the old ones, nobody is collecting the old ones are they? Of course not when cost and technology plus convenience overtake something like this.
Comparing any of this to vinyl is silly. Its not in the same league as its more a nostalgia play and sound quality issue, Cassette would have been vinyls replacement, but it just is not better, nor while sitting at the house does it matter when it takes an extra 30 seconds to flip a vinyl vs. CD or Auto tape deck reverse play. Plus Vinyl is like a classic car, or a Harley. CD is a cheap mid 80's honda nobody really cares about or will go out of their way to find.
So truth is it comes down to music and where you want it?
In the car, forget CD all together, I don't know one person carrying them around anymore, you have 1000 albums at a finger touch with a Dock in the car now and a full digital backup at home. And back in the day have 100 cd's laying on the seat melting was not that fun anyway!
I still have CD's, but its one in 20 times I might put a CD on because I can hear it in the car anytime. And mostly all my digital at home consists of Hi def Bluray concerts etc...
Beyond that I have no use for the CD plastic itself, accept I will buy it if its cheap enough to convert over to the Ipod or server anyway if its something I don't have or can't have on Vinyl.
Technically its dead, Fundamentally it just does not know it yet.