while the previous two answers are the more clear responses to the provocation of the words "hierarchy" and "justified" i'll take the opportunity to trouble the answer a little bit.
hierarchy can be understood as one of the bad words for anarchists, but of course it has nuance, and it's the nuance that raises questions like this, i think.
i have been in plenty of classes in which the teacher doesn't know more than the students, or if they did know more, they didn't express it. this was frequently done in the name of not-maintaining/creating-a-hierarchy, but ultimately it seemed to me to be wasting the time of the students, and allowing the teacher to not take responsibility for the power that they had, by definition, in a classroom setting.
there's a lot of stuff mixed into this question - like, how do people demonstrate autonomy (or lack-of-hierarchy) as a student and as a teacher? is it ok to be ... submissive (? better word) for a period of time because it makes one more available to some kinds of information if one is not struggling to maintain oneself (i know, very controversial statement here--can cite many stories of apprentices who have to become humble before understanding what the teacher is trying to teach them--and of course, this is mostly articulated in stories about non-western methods, which is both orientalism but perhaps also a point about *how* westerners tend to value self, struggle, autonomy, etc, not just *whether* to value...)
i don't know exactly where humility fits into a question about hierarchy, especially a hierarchy that is chosen, as some (of course not most) teacher/student relationships are. and how a teacher's humility would/should be demonstrated differently from a student's...
also, not all teacher/student relationships are in classrooms, and not all are between adults/children. some teachers are state agents, and some are not (ie they're outside of schools), some teachers are parents of the children they're teaching, some students are forced to be in classrooms, etc etc