This is a big step in Harry's growth. Having spent his whole life as an obedient doormat, he's finally given something special just for him. He's willing to assert himself over his much larger uncle—and take a step towards making his own decisions—by fighting for it.
HAGRID: It's not every day that your young man turns eleven, now is it?
It's no mistake that Harry receives his invitation to Hogwarts on his eleventh birthday
HAGRID: You're a wizard, Harry.
HARRY: I—I'm a what?
HAGRID: A wizard. And a thumping good one at that, I'd wager. Once you train up a little.
HARRY: No, you've made a mistake. I can't be...a-a wizard. I mean, I'm just... Harry. Just Harry.
HAGRID: Well, Just Harry, did you ever make anything happen? Anything you couldn't explain when you were angry or scared? Ah.
A big part of coming of age is realizing what you're capable of, and understanding that the things you think make you freakish are actually wonderful and extraordinary. In this case, Harry just needs a little push.
SNAPE: Clearly, fame isn't everything, is it, Mr. Potter?
In other words, you have a lot to learn, kid—and while you're doing your best, don't expect the world to play by the rules.
FILCH: Oh, for God's sake, pull yourself together, man. You're going into the forest, after all. Got to have your wits about you.
DRACO: The forest? I thought that was a joke! We can't go in there. Students aren't allowed. And there are werewolves!
FILCH: There's more than werewolves in those trees, lad. You can be sure of that.
Haunted forests are an old standby for testing the mettle of fairy-tale youths. Rowling is too keen a student of literature to let this motif pass by without sending her heroes (and one weasel antagonist) in there to see what they're made of.
MCGONAGALL: As for you two gentlemen I just hope you realize how fortunate you are. Not many students could take on a full-grown mountain troll and live to tell the tale. Five points...will be awarded to each of you. For sheer dumb luck.
McGonagall's no idiot. She knows that the boys passed a big test by defeating the mountain troll. But she also knows that the fates just smiled for them to do so…and they had better be aware of that fact.
HARRY: Does anyone feel like...we shouldn't be here?
HERMIONE: We're not supposed to be here. This is the third floor. It's forbidden.
Part of coming of age means breaking boundaries established by authority figures. In this case, they do so by accident…but that first step allows them to make others more boldly and deliberately.
HERMIONE: What's wrong, Harry?
HARRY: It's too simple.
RON: Oh, go on, Harry! If Snape can catch it on that old broomstick, you can! You're the youngest seeker in a century!
Harry already smells trouble when the task before him looks too simple: he has his skills, but he's not relying on skill alone to carry the day. That's another important part of coming of age.
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.
Part of Harry's trial means standing alone against the threat. Everyone knows it, including Ron, who has to remind him that this is more important even than their friendship.
HAGRID: Listen, Harry, if that dolt of a cousin of yours, Dudley, gives you any grief, you could always, um, threaten him with a nice pair of ears to go with that tail of his.
Coming of age has its privileges, like the ability to frighten previously insurmountable threats into leaving you alone.