The usual claim for the Gadol of each generation’s authority is this Gemara (Bava Metzia 91b):
אמר רב חנן בר רבא אמר רב, אפילו ריש גרגותא משמיא מוקמי ליה.
So every leadership position is ordained from Above. But might the flock ever deserve less than ideal leaders? Might not the leader be a hint and rebuke to those being led to change their ways for the better?
Wait, here’s another Gemara, Bava Kama 52a, which says just that:
מאי משכוכית? …רבי יעקב אומר, עיזא דאזלא בריש עדרא, כדדרש ההוא גלילאה עליה דרב חסדא, כד רגיז רעיא על ענא עביד לנגדא סמותא.
The leader is always chosen by Hashem, and everything Hashem does is for the good. But is that the immediate, obvious good or the more ultimate, atonement kind of “good”?
In fact, why not go back to the example itself? Anyone who has a tough boss, raise their hand!
So the question is, how is our generation doing in terms of observing Judaism? Well…
P.S. There is also the rarer possibility of a good generation with a bad leader and vice versa, as Chazal say in Sanhedrin 103a.