Because music isn't very important for a large number of people. They'd gladly listen to whatever is free.
But if music is important, people should be willing to pay for it.
People have always paid for music, both live and recorded -- from the songbooks of the 1800s to 45s, LPs, cassettes and CDs.
It appears they're less apt to want to pay for it since the internet became a music medium around the turn of the century, when the MP3 became more accepted, though, and the file sharing debacle.
One reason rock music is fading is because the instruments used to make it are fading in popularity.
Playing instruments in general has also dropped in popularity. Even symphony orchestras have seen better days, being more and more a haven for rich people who comprise the people who can afford to go to the concerts or buy/rent the instruments.
With hip-hop, pop and even much of modern country you don't really need an actual instrument -- a computer with a decent DAW and a library of various music samples, loops and sounds will provide a backtrack for your rap or singing -- any instrument is only added in here and there for atmosphere, like the acoustic guitars in modern country songs.
I'm not alone in this assessment, some popular producers who also have YT channels think much the same way.
Rock will always be around -- blues and jazz are still around, they're just not radio staples anymore. There still are some guitar and drum sales, with young people adding to the next crop of them, it's just that they're vastly outnumbered by the hip-hop crowd, and the genres that use guitars and drums are diminishing.
There are still bluegrass bands all over the US. You just don't hear them on most radio stations. Barring the rise of some artist that strikes a chord with enough people, rock is headed the same way.