The music reflects the people who write and produce it, as well as the people who listen to it. In Cobain's case, he was quintessential Gen-X -- his age, everything about him.
P.S. (I take these studies about demographics with a grain of salt, but they are fun to talk about.)
It is funny how that works out. I was born in ‘77, so Cobain is 10 years olders than me, but I was in high school in the early 90’s when Nirvana was HUGE. I’m toward the later end of Gen Xers, so I actually identify more with the 90’s (when I was in high school and college) than the 80’s.