Berachos 27b-28a records the story of “Bo BaYom,” in which Rabban Gamliel was kicked out from being the Nasi as a result of two separate incidents with Rebbi Yehoshua (Ibid. and RH 24b-25a) and one with Rebbi Tzadok (Bechoros 36a). After reading through this Gemara, I realized that Ein Mishpat (which cites Tur, Shulchan Aruch, Smag, and Rambam when they pasken the Gemara) isn’t quoted at all on that part of the sugya.
This made me wonder: The Gemara certainly details all the wonderful benefits of Rabban Gamliel being forced out temporarily, such as the great influx of Torah. But did the ends justify the means?
Since the Gemara doesn’t cite the story with Acheirim and Yesh Omrim (Horayos 13b), while it does cite others, it seems that that one happened after this story, thus indicating that Rabban Gamliel clearly disagreed with them (as he continued doing exactly what he had been doing that got him fired in the first place). On the other hand, the Gemara also says that Rabban Gamliel, upon seeing all the Torah on that day, had his doubts if he was correct all those years, and Hashem eased his doubts with a dream (though Rabban Gamliel was indeed incorrect for keeping people out of the Beis Midrash). Perhaps he was acting based on that?
What do the poskim have to say about this? If such a situation were to occur today, where the Rav of a community (or worse, a Gadol HaDor) were to publicly humiliate someone as Rabban Gamliel did - perhaps for noble intentions, but still forbidden - is the community allowed to fire the Rav and get a new one in his stead?
Normally I would tack a CYLOR disclaimer on here, but given the topic, I’m going to say see your non-local-but-still-personal Orthodox Rabbi instead.