Nobody wants them even when they are free.
That's definitely not true. A lot of bands and smaller record labels will distribute free sampler CDs in stores and after shows as a method of promotion. I've acquired quite a few CDs in this manner and discovered more than a few bands by listening to these sampler discs. Sure, I COULD just go and download these tracks online for free (and most people distributing these free CDs will post them for free online), but at that point, I have to think about it and explicitly decide that I would like to download these random tracks. It's much easier for me to just grab a free sampler CD in a store and pop it into my car stereo as I drive around so I can see if there's anything of interest to be found on it. It's a very effective method of promotion, at least in terms of getting your band (or bands) heard. I have no idea if it increases sales (digital or not) any, but it certainly raises awareness of bands.
Newer better options exist.
Depends on what you mean by "better". If you just mean convenience, than yeah, digital downloads are easy and convenient, since you can get a very wide selection of music within minutes of simply deciding that you want it. However, if you care about sound quality, CDs have much better fidelity due to a lack of compression (most digital stores don't offer music in a lossless format yet). Also, there's the matter of being able to resell them. If I buy a digital track and decide that I no longer want it, all I can do is delete it. If I buy a CD and decide I don't want it anymore, I can sell it. There's no legal way to resell digital music (nor can I think of a reasonable way in which that that can be done). I like the fact that if I own a CD, I own something tangible that is of some retail value. Also, I can convert that audio CD into compressed audio files if I wish to have them for an MP3 player or for ease of pulling up on my own computer.
I don't want to sound like I'm getting defensive of CD media here - it's definitely got major flaws, such as the massively high retail prices at some stores (new CDs purchased at an FYE, for example, typically retail for about 19.99, which is ridiculous) and the fact that you DO have to shop around to find what you want, since not all stores will have all recordings. Still, I don't think the market for physical CDs are going away anytime soon, since there are definitely reasons why people would prefer to have them, at least in the present day. As for the future, I have no idea - they'll almost CERTAINLY go away eventually. However, I think that it's going to be quite a long way off.
Term, holidays, term, holidays, till we leave school, and then work, work, work till we die. -- C.S. Lewis