To give a picture of the behavior of the grasshoppers would be my first choice but it could also be to show the violence of nature
The anecdote tells about the censorship of a book. In some countries of the world, government forces impose selection criteria on artistic and cultural production.
This episode is the fictionalization of a situation of repression that has happened repeatedly in history. In the famous book by Ray Bradbury "Fahrenheit 451" the burning of books is one of the central themes of the plot.
The fragment describes the situation of censorship and burning of a book that belongs to the narrator. Instantly produces the reader's empathy with this character whose work has been destroyed.
Because they believe Sirius Black is there.