Symbolism, Imagery, Allegory
Gryffindor's sword is one of the relics of the Hogwarts founders, along with Ravenclaw's diadem, Hufflepuff's cup, and Slytherin's locket, and it's the only one not made into a Horcrux by Lord Voldemort. This is no ordinary sword, mind you – like the other objects, it carries with it the aura of its heroic owner, and is a symbol of Godric Gryffindor's distinguishing trait, bravery. The sword seems to recognize a "true Gryffindor" when it sees one, and it has a way of appearing when Gryffindor is in need – in this book, it magically appears in the Sorting Hat when Neville requires it to chop off Nagini the snake's head (Chapter 36). The sword is an enduring symbol of the values that Gryffindor House represents, and it acts – seemingly of its own will sometimes – to staunchly protect these values.