The ending of Annabelle (2014) is a trade: Evelyn gives her soul to the demon so that Mia keeps hers and Leah is returned unharmed. The doll vanishes with the demon, and the film leaves it there for a short time.
The sequence that leads there is the most carefully built in the film. The demon, speaking through Father Perez's body after he is attacked on the way to the Warrens, takes Leah to force Mia to surrender her own soul. Mia climbs to a window with the doll in her arms, and John and Evelyn pull her back. Evelyn then steps in, and the film tells us why she can: her own daughter died in a car accident years earlier, and the sacrifice is her atonement. In my opinion, this is the one idea in Gary Dauberman's screenplay that is truly deliberate, because it ties the demon's demand for a soul to a specific grief rather than to a random victim.
Six months later the doll turns up in a shop and is bought by a mother for her daughter, Debbie. It then ends up in a glass case among the Warrens' artifacts, which links the film directly to The Conjuring (2013), where the Warrens are shown handling a haunted doll case and are known for their work with cursed objects.
How does it compare with the rest of the saga? The Conjuring (2013), directed by James Wan, builds its scares around the Perron farmhouse and keeps the Warrens at the center. Annabelle (2014), directed by John R. Leonetti (who had been the cinematographer on The Conjuring), instead keeps the Warrens offstage and puts a young couple in the middle. It could be argued that the nursery and apartment set pieces rely on familiar jolts, and that the third act carries more weight than they do. A dead daughter and a car accident also return in Annabelle Creation, where Samuel and Esther Mullins lose their daughter Bee, so the saga keeps coming back to that kind of loss as the doll's origin. Annabelle Comes Home then picks up from exactly the glass case and artifacts room this film closes on, with Dauberman directing.
The commercial context helps explain why the ending points outward. Box Office Mojo lists a reported $6.5 million budget against about $257.6 million worldwide, and the film opened with about $37.1 million in the US. That scale of return is the likely reason a doll in a glass case was treated as a franchise anchor rather than a one-off. That being said, the Warrens' claims about haunted objects remain claims, and the film is a fictional horror story built on them. Nothing in the ending is evidence of anything paranormal.