While there aren't any demons present on The Haunting of Bly Manor, a metaphor for an important biblical possession and exorcism weaves its way throughout the story. The Haunting of Bly Manor primarily focuses on an au pair, Dani, that's hired to watch two children, Miles and Flora, at a remote estate. While in school, Miles learns about the "Miracle of the Gadarene Swine," laying the foundation for an important plot point in the series.
Father Stack, Miles's teacher, discusses the Bible verses Matthew 8:28–8:34, Mark 5:1–5:20, and Luke 8:26–8:39, where Jesus comes across either one or two possessed men. While the demons don't want to leave their host, Jesus gets the permission of a herd of pigs to take on the demons. The pigs then rush down a hill and drown, allowing the man to return to his old self. The story causes Miles to ask whether, if the demons needed permission from the pigs in order to possess them, they also needed permission from the man they were possessing. It's this idea of permission that plays an important role in whether or not a ghost is able to take complete control of a host on Bly Manor.
After Peter Quint, an associate of the children's uncle, is murdered by the ghost of the Lady in the Lake, he accidentally takes control of Miles. While the rest of the house believes he's on the run, Peter reveals himself to former au pair Rebecca Jessel and begins to take control of her with permission. Eventually, he lies to her, saying that they can be together forever if she doesn't mentally push him out. In control, Peter walks Rebecca's body into the lake and drowns her. Peter and Rebecca then make a plan to take control of Miles and Flora's bodies so that they can live life anew, but Rebecca betrays him because she knows it's not the life Flora deserves. Flora is then taken by the Lady in the Lake, who thinks Flora is her daughter, before Dani comes to the rescue and allows the Lady in the Lake's ghost to enter her own body instead.
Both Rebecca and Dani have the same fate as that of the swine in the biblical tale. They give their full permission to another to enter their body and pay a price — although Rebecca didn't fully know what she was doing, while Dani did it to save Flora.