Librarian Kaela here. Go ahead and ramble at me about ghost-types in literature. (My spooky guys are hovering by me as I type. they want to know! /hj)
Hi Kaela!! Thanks for the ask.
Ghost types are almost unavoidable in literature, and they're present in every single genre: from horror to romance, from fantasy to sci-fi. They're useful both as a plot and narrative device, as well as certain characters due to their supernatural-ish nature.
There's a lot of iconic ghosts in literature, and they're not limited to just horror stories: Hamlet's father coming back as a Yamask with the King's face on it, the different ghost pokemon that visit Scrooge in the Winter Solstice Carol, the pokemon that raised Nobody Owens in the Greavard's book, so on and so forth.
There's also the fact that a lot of people who write or study literature are drawn to ghost types as well. And it makes sense, doesn't it? What is literature but a haunting inscribed in ink? What are stories but hauntings of events? Ghost types love haunting libraries for a reason.
Anyways, I've rambled a lot at this point, but outside of everything I just said, ghost types are just cool and fun! There's still a lot of things about them we don't understand and that really sets off a writer's creativity because the possibilities are quite literally endless.