They didn't. When all you have is a hammer, everything looks like a nail.
D&D used to be stereotyped as a thing for nerds. Video games also used to be for nerds. Then we had a couple of generations growing up with video games, and then people started to say, "Hey I grew up playing video games...