Another interpretation. Why "like sheep" (Psalms 78:52)? Rather, just as these sheep break the trees, and even so their owner is not strict with them, therefore He calls them sheep. And so it says, "And you, My flock, the flock of My pasture, you are humans" (Ezekiel 34:31). If sheep, why humans? And if humans, why sheep? Rather, Rabbi Yochanan said: Sheep for punishments and humans for the giving of reward. [If they are guilty, He treats them like sheep according to their punishment; and if they have performed the commandments, He treats them like humans to give them reward. Thus: sheep for punishments and humans for the giving of reward.]
Why God Calls Israel Both Sheep and Humans in Tanchuma Beshalach
Midrash Tanchuma Buber, Beshalach 15:2
ד"א למה כצאן, אלא מה הצאן הזה משברת את האילנות, ואע"פ כן אין בעליה מקפיד עליה, לפיכך קורא אותם צאן, וכן הוא אומר ואתנה צאני צאן מרעיי אדם אתם (יחזקאל לד לא), אם צאן למה אדם, ואם אדם למה צאן, אלא אמר ר' יוחנן צאן לעונשים ואדם למתן שכר, [אם חייבים נוהג בהם כצאן כדי ענשו, ואם עשו מצות נוהג בהם כאדם ליתן להם שכר, הוי צאן לעונשים ואדם למתן שכר].