This topic comes up with pretty clockwork regularity.
I do think that live music has a magic that playing recordings doesn't. There's an element of human engagement that you need a live performer to create.
The decline of live music is something everyone has noticed. I don't think there's any one cause, but a combination of them. One is "Netflix and Chill" - which is to say, when deciding what to do on a Friday night, there are lots more entertainment options than there used to be, many of which don't require leaving the house.
One is, as has been commented, the rise of electronic music's popularity, that no live band can recreate. We may not care for it, but what we like doesn't matter. I remember, recently, some EDM pop hit coming on and my son saying, "I love this song, it has such a great beat." I listened, and said, "It's a regular four-on-the-floor." But people don't just listen to one kind of music; my son also likes James Brown and jazz.
One is that the bar business seems to have slimmer margins and higher risk of failure than was the case in its heyday. DUI and public smoking laws are a good thing, but they do mean that the venues don't rake in money hand over fist so much. That means less money for bands and venues disappearing.
One is that, as has been commented, a lot of bands suck. I'm frankly sympathetic on this, as I'm a relative newcomer to the scene. The main way a band gets tight and gets to the point they can put on a good show is through experience playing. But you only accumulate the experience to put on good shows by living through some bad ones.
Now, if you have a big thriving scene where downtown has lots of bars featuring lots of bands, or where a bar can afford to have a couple of different bands over the night, people can go hopping from one bar to the next, check out the different groups, stick around for the good ones and leave the bad ones after a song or two. The bad bands get experience and either get good or give up, and the good ones carry the scene. But if you have a reduced scene with fewer venues, more scattered, with less money to invest in music, you lose that. You go to a bar, the band sucks, and there isn't another bar with a better band across the street. Get burned like that a couple of times and soon you're posting on facebook that you'd rather "netflix and chill" than go out to a bar and a band. "Live music tonight" becomes the kiss of death to venues.
And, again just to sum up something that's already been posted, the slim money does make it harder to put on a splashy show. Lighting and PA have been mentioned. If the venues are only offering $300 in 2018 money for a gig, you can't afford five- and six-member bands, you can't afford a sound guy. You're running sound from the stage, and how sophisticated of a lighting system are you going to invest in before your first $300 gig? I've been dealing with that myself. I can't afford to go dropping $2000 on lights right off the bat, after having already gone into debt for PA. I've spent a couple hundred, which gets us something pretty minimal. No one is going to be impressed by our light show over the next year or so. Hopefully the band is still together and getting gigs after that and I'll be able to afford to upgrade, but that will have to wait and see.