On an economic level, business entrepreneurs realized after the depression in the 1930s that there was now a “youth culture” with expendable income and not a lot of experience or intellect to use towards making purchasing decisions. All sorts of popular entertainment came from these marketing ventures, and rock was probably the most successful. The response was immediate; I want to get laid, I want to do drugs, I want to piss off my parents, so it was obviously speaking directly to them and they loved it.
Rock musically came out of the most accessible parts of blues, jazz, and folk music. Add lyrics about love or angst filled rebellion and you have a hit making machine. It became most clear (if not before) after Woodstock; the alleged pinnacle of rock community, where drugs & over priced products were exploited to the fullest extent, that rock was a commodity, and concert organizers, record labels, drug dealers, and radio stations all had their hands in the cookie jar. They were deceiving massive amounts of young people into thinking that some form of consumerism was a rebellion; they all fell for it. It probably didn’t even become clear to them until 20 years later when they were wearing a suit and working for a large company.
Death and Black metal deliberately function within a framework that is not easily digestible and therefore marketable (at least I’d like to think so). Within this framework they can attempt a greater range of creativity while not being limited by public opinion. You have a band like Cradle of Filth here or there that throws all of this out of the window, but they instantly lose all artistic integrity when doing so. The best metal bands realize that art with lasting value transcends trivial things like personal problems or anger and attempt to create works with at least a bit more relevance and lasting value than some rock song that says something such as ”My girlfriend left me today, life sucks”.