Electric guitar (and electric bass) enjoyed their day in the sun, and it was well deserved. When the Fender guitar came on the scene, a dance band required as many as 19 musicians, all playing instruments that took years of training just to even make a decent sound, much less to play at a performance level.
The electric guitar and bass had a much different learning curve (not better or worse, like C vs Python) and 3 or 4 musicians could take the place of 19. Of course changing musical styles played a role in this transition as well, so I'm really over-simplifying here. The simpler harmonic structure of songs made it easier to crank out hits, and the manipulation of electronic effects allowed the creation of new styles such as hard rock, heavy metal, and so forth.
Rock music also had a certain social appeal. As opposed to taking lessons and then sitting at home and practicing scales, you joined a bunch of friends, and all learned together in the absence of any adult supervision. Many bands create new songs together by trial and error. Styles and songs were learned by ear -- the folk music tradition, which certainly has its own historical precedent.
It couldn't last forever. Fifty years is a pretty darn good run. New instruments have emerged, with their own learning curve and cultural appeal. That's great. Meanwhile, playing an obsolete instrument can still have its own attractions.