I prefer buying DVDs for movies and television shows, although all of the seasons of My Little Pony and the first Equestria Girls movie I bought through iTunes. There's also the rare case when what I want is exclusively available online.
I have bought CDs recently, notably when I go to a concert and I love the opening group. It can be difficult in some cases to find those groups in a digital medium, and physical copies are nice to hold in your hands and peruse. But, most of my music is bought from one of two categories: digital or vinyl. There's nothing like going to a record store or a Goodwill and picking out a bunch of really good (albeit old) records for $1 each, and it's cool to listen to them on a turntable. I also have a device which lets me plug the turntable into my computer and rip the tracks from the record (and it was really cheap). There's some audio editing involved, but it effectively lets me avoid buying the same album again online. Also, many newly produced vinyl records, while more expensive than their CD or digital counterparts, often include a free download of the digital album. In fact, I got my brother a record he wanted for Christmas last year, and he let me download the digital version while he kept the record.
One thing you have to look out for when buying old records, though, is that sometimes people put the wrong record in the album sleeve. I bought a copy of John Denver's "Farewell Andromeda" only to get home and discover that "Rocky Mountain High", which I already had, was inside. It did only cost $1, though, so I didn't make a big deal out of it.