HAGRID: No thanks, Tom. I'm on official Hogwarts business today.
This is a quiet lesson for Harry. Having just met Hagrid—perhaps the first adult who he respects and looks up to—he sees Hagrid set his own pleasure aside for the sake of something more important. It's a lesson he'll learn quite well.
HERMIONE: Now, if you two don't mind, I'm going to bed before either of you come up with another clever idea to get us killed. Or worse, expelled.
RON: She needs to sort out her priorities.
Duty isn't always as clear here as it could be, and it's up to Harry and his friends to determine where their real priorities are…and what rules can afford to be bent.
HERMIONE: It's my fault, Professor McGonagall.
MCGONAGALL: Miss Granger?
HERMIONE: I went looking for the troll. I'd read about them and thought I could handle it. But I was wrong. If Harry and Ron hadn't come and found me, I'd probably be dead.
MCGONAGALL: Be that as it may, it was an extremely foolish thing to do. I would have expected more rational behavior on your part, and I am very disappointed in you, Miss Granger.
This is an important moment of growth for Hermione. She lies to protect her friends, realizing that her duty to them is more important than following the school rules.
DUMBLEDORE: It shows us nothing more or less than the deepest and most desperate desires of our hearts. Now you, Harry, who have never known family...you see them standing beside you. But remember this Harry. This mirror gives us neither knowledge nor truth. Men have wasted away in front of it. Even gone mad. That is why tomorrow it will be moved to a new home, and I must ask you not to go looking for it again. It does not do to dwell on dreams Harry, and forget to live.
The power of the mirror—and its danger—is that it distracts people form their duties, enticing them away from the unpleasant tasks that sometimes need doing if the world is to keep moving forward.
HAGRID: You're meddlin' in things that ought not to be meddled in. It's dangerous.
Hagrid's sense of duty means protecting a group of children from a terrible danger. That puts him in conflict with Harry, Ron and Hermione's sense of duty: an idea the movie returns to more than once.
RON: Do you want to stop Snape or not? Harry, it's you that has to go on. I know it. Not me, not Hermione, you.
Thank you Ron. We couldn't have summed up Harry's duties in this film more clearly.
RON: Trevor…shh! Go, you shouldn't be here!
NEVILLE: Neither should you. You're sneaking out again, aren't you?
HARRY: Now, Neville, listen. We were—
NEVILLE: No! I won't let you! You'll get Gryffindor in trouble again! I-I'll fight you.
Duty can sometimes lead allies to fight. Neville doesn't see the whole picture here. He only knows that Harry and his friends are getting their House into trouble. So he does something he's scared to do because he believes it's the right thing: an honorable (if misplaced) sense of duty.
HARRY: No! Don't move! Don't forget; we're still playing.
Another great little wrinkle on the nature of duty. Ron's sacrificed himself so that Harry can get to the Stone, but they can't help Ron without making Ron's sacrifice useless. Eyes on the prize, gang.
VOLDEMORT: Don't be a fool! Why suffer a horrific death when you can join me and live?!
Harry doesn't hesitate here: his sense of duty is strong and isn't going to be swayed by creepy head enticing him with rewards from beyond the grave.
DUMBLEDORE: Relax, dear boy. The stone has been destroyed. My friend Nicholas and I had a little chat and agreed it was best all around.
HARRY: But Flamel, he'll die, won't he?
DUMBLEDORE: He has enough Elixir to set his affairs in order. But yes, he will die.
We never see Flamel, and his activities are only hinted at, but he's important enough that Dumbledore reveals his ultimate fate, and how Flamel's sense of duty is compelling him to surrender immortality itself.