The beast in question is the hippogriff Buckbeak, a majestic but adorable creature, who made his debut in Prisoner of Azkaban. In that story he assaulted Draco Malfoy, the Slytherin bully who was picking on him, and was sentenced to death. Buckbeak’s imminent execution forms an important part of the book.
Who else would Dumbledore call to save poor Buckbeak if not a famous magizoologist? And bearing in mind that Harry Potter lore also states that Dumbledore was once Newt’s teacher, and they remained friends, the older Newt had a perfectly good reason to be at Hogwarts that day. He was there fighting for hippogriff rights!