The Greedy Rapooh was a Gengar of legend that always stole stuff, so it was locked away for hundreds of years. When Team Rocket accidentally released it, it fell in love with Acerola and tried to steal more stuff to impress her. It wanted
Acerola to come with her but instead she invited it to be her friend and she'd keep it company as she didn't want to leave her library.
Gengar’s ability is Cursed Body and when a Pokémon is affected by Cursed Body, it sometimes becomes unable to attack.
The seventh battle of the Top 16 round of competition for the Alola League featured
Acerola's Gengar (Greedy Rapooh) verses
Kiawe's Marowak. Kiawe’s used his Marowak, who is a Fire and Ghost type, as Ghost-type moves are super effective against each other.
Professor Kukui noted that the battle might not last long because of the type effectiveness. Marowak was affected by Cursed Body and was unable to move and then Gengar used Thief to take its bone away. After it was able to move again,
Kiawe's Marowak went inside of Gengar and got its bone back and unleashed a counterattack and knocked out Gengar.