My knee-jerk reaction is 'they're a plot device,' but the longer I sit with it, the more I think that sells them short. In stuff like 'Howl's Moving Castle' or 'The Worst Witch' adjacent books, the magical aunt often functions as a destabilizing force in an otherwise orderly domestic setting. They blow in, chaos follows, and the protagonist—usually a kid bored with their mundane life—gets a crash course in a wider, weirder world. They're the escape hatch from suburban normality.
But their real narrative job is to be a bridge. They’re not the parent, so they don't carry the same weight of discipline and daily responsibility, which lets them be a guide who's allowed to be a little irresponsible. They hand over the key but rarely stick around to clean up the mess, forcing the young protagonist to grow up and solve their own magical problems. In a way, they're the ultimate mentors because their lessons are often messy and learned the hard way.