The Kesav Sofer zt”l explains that when most shepherds tend their flocks of sheep, they are really worried about themselves. Their actual goal is to earn money by selling the wool and meat of the sheep. If they would find themselves and their flock in danger, they would abandon the sheep and just try to save themselves.
A “shepherd of Yisroel”, however, is not like that. A Jewish leader must be prepared to sacrifice himself for the good of the people. He must not abandon them in the face of danger. Rather, he must protect them at all costs – even if it places his own life at risk.
Moshe was saying that Klal Yisroel should not be like sheep who do not have a shepherd when times get tough, because the shepherd runs away to save himself and leaves the sheep alone. Rather, their shepherd should stay to protect them even when they are threatened by danger.