Decidueye's Ghost typing has a couple of possible origins, some more sensible than others:
1: Dead on Arrive-owl
Decidueye is based off of stilt-owls, a type of owl that used to be native to Hawaii but are now extinct. Only fossils have ever been discovered (because they're dead and all). Stilt-owls had unusually long legs for an owl, which is why Decidueye has a more humanoid appearance than Rowlet or Dartrix. They were capable of flight, but were though to be largely terrestrial. That, and them being extinct explains Decidueye's Ghost (and loss of Flying) typing pretty well.
2: Out With the Old, and in With the New
Game Freak seemed to be trying to give us unique starter typing combinations this time around. We got Water/Fairy, Fire/Dark, and Grass/Ghost — all pretty rare combinations. Only three, two, and five Pokémon have them, respectively. However, there are seven Grass/Flying Pokémon (counting Rowlet and Dartrix). Probably one of the reasons that Decidueye is part Ghost-type is because GF was trying to give us something new.
3: Grass/Flying Kind of Sucks
It really does.
4: Caped Crusader
Why stop at the most logical explanations when theorycrafting is so much fun? My theory for Decidueye's Ghost typing is that it's partially based on superheroes. Look at it — the mask/goggles, the hood, the cape, the abs, the unique fighting style… it all screams "Alolan crime fighter." It's like if Batman and Green Arrow had a kid, but it was an owl. Heroes like Batman, Moon Knight, and Daredevil are scariest at night, when they're hard to see, like… ghosts. The twing of a bowstring, the ruffle of a cape, and Decidueye vanishes into the night, with one more bus stop safe from the greedy paws of Team Skull.
5: Roll for Initiative
Oh man, here's an even wilder theory and the one above! This one doesn't do a terrific job at justifying Decidueye's Ghost typing, but it's cool none the less.
A (likely secondary) trend that people noticed with the Kalos and Alola starter Pokémon is that they bear resemblances to common RPG character types:
Mage
Paladin
Rogue
Barbarian
Bard
Ranger
And it kind of makes sense. Delphox is a magician, Chesnaught is a tank, Greninja is agile but fragile, Incineroar is a brawler, Primarina is a singer and Decidueye is an archer. Of course, what does Decidueye being an archer mean when it comes to its Ghost typing? Well, the starter Pokémon's "classes" match their secondary typing pretty well: A mage's ability to use telekenesis, mind control, etc. is fitting for Psychic-types. Paladins are front-line melee damage sponges who get right up in the enemy's face — perfect for Fighting types. Rogues are unpredictable assassins, which fits the Dark type. But for Incineroar, I must confess, there's not much linking the full-offence barbarian with Dark-types — that's more of a fighting type, but nobody wants another Fire/Fighting type, so Tony the Tiger gets by on looks alone. Bards, um, sing, and heal a little bit. The Fairy type is probably the closest thing to a "healer" type in Pokémon. Rangers are masters of stealth and disguise, making them difficult to detect — like a ghost.
Most of that exposition was pointless. Long story short, this theory offers the explanation that Decidueye's Ghost typing plays into the ranger archetype of stealth and mobility. It's not the best, which is why I saved it for last, but it's a damn fun theory, especially if you're at all into RPGs.
One last thing, about Spirit Shackle: it's totally justifiable as a Ghost-type move. While Grass does make sense for an arrow attacks, Spirit Shackle is better as a Ghost move because a) Decidueye needs a signature move and b) it's a pretty common trope in entertainment where one is able to pin down or grab someone's shadow, usually with some magical or supernatural forces involved. Ghosts are by definition supernatural, and in Pokémon Ghost-types use a lot of shadow manipulation (Shadow Tag, Shadow Sneak, etc.) so for a phantom archer it makes sense for its signature move to anchor the target in place by their shadow.*
*although when you think about it, Spirit Shackle shouldn't work at exactly noon, when there are no shadows. But who cares about little details like that.
Wow, that took a lot longer than I thought it would. Sorry for any typos. I hope at least some of it helps satisfy your curiosity! :D
Also if I got some of the class stuff wrong please correct me, I'm not a genius when it comes to RPGs.