CDs and DVDs aren't going away, but they are no longer the sales behemoth they once were. The top sales year for CDs was 2000 when they sold almost 800 million of them. Now CD sales are less than half that, around 300 million. (Vinyl sales, while up, are still only about 1% of CD sales.)
Now, that's still a lot of CDs and record companies are still going to serve that market for a long time. While some people have moved to downloads, there are still a lot of buyers who don't download and aren't going to start anytime soon.
(One other aspect to consider -- while downloads are generally cheaper than new CDs, there is a tremendous market for used CDs. You can often buy a like-new CD for less than the lossy format download. But, the used market also depresses new CD sales.)
So, yes, the trend is toward download, but CDs are going to be around for many years to come. The same is true of DVDs. There is a trend toward streaming, but there are still a lot of buyers who prefer the physical disc.
Now, that's still a lot of CDs and record companies are still going to serve that market for a long time. While some people have moved to downloads, there are still a lot of buyers who don't download and aren't going to start anytime soon.
(One other aspect to consider -- while downloads are generally cheaper than new CDs, there is a tremendous market for used CDs. You can often buy a like-new CD for less than the lossy format download. But, the used market also depresses new CD sales.)
So, yes, the trend is toward download, but CDs are going to be around for many years to come. The same is true of DVDs. There is a trend toward streaming, but there are still a lot of buyers who prefer the physical disc.