1. It looks laid back, which isn't completely a bad thing depending on the scenario. School are places of formal education, thus you are expected to look formal in both dress code and manners. It could be considered bad manners to put your hands in your pockets because you look laid back and as if you don't care.
Have you ever been at a public school? Formal does not fit well in there... Where I'm from, teachers expect only a few things; that the students pay attention, do well in class, have as few days of absence as possible. Short of that, it almost doesn't matter.
2. I have a friend who wears his hat constantly inside and out, you don't do it, or shouldn't, for the same reason you don't on an umbrella in doors or wear a hood. It isn't raining inside so it serves no purpose in that scenario, the only other reason you should wear a hat indoors is if the place is freezing so you can keep your head/ears warm. If your hair is a mess, fix it yourself and stop being lazy and take some pride in your appearance instead of moaning about rules/tradition/formalities
Now, I understand what you're saying, and I get it. But does it really matter? If someone wears a hat inside, is it so fundamentally offensive and a grave violation? It's a piece of clothing, that shouldn't be of any concern either way. If your friend want to wear a hat inside, let him do it. He's not hurting anyone, and seeing as he is your friend, you already have some respect for him, and he for you. Are you going to burn a bridge because of a hat? Does this hat symbolize his depravity somehow? 'Cause I'm sure he probably just finds it comfortable or fashionable.