The 80s had a lot of fantasy and occult themes going on. There was the “Satanic Panic” that the religious right brewed up as a means of social control. Dungeons and Dragons was vilified (see Mazes and Monsters starring Tom Hanks). Heavy Metal—which leaned into mythical themes—was also targeted. And what the right tries to push down naturally gains interest in a rebellious way. Fantasy movies had a bit of a heyday. Conan the Barbarian, Clash of the Titans, Never Ending Story, Princess Bride, Willow, Dark Crystal, etc.
It probably helped that special effects were starting to get sophisticated. D&D had more exposure because of the religious panic. A lot of early computer/console games had fantasy themes.
So, they were both probably children of the zeitgeist. It was a weird time. Stranger Things does a pretty good job of capturing the vibe.