"Then Moses had Israel journey" etc. (Exodus 15:22). This is what Scripture says (Psalms 78:52): "But He made His own people journey like sheep." Why "like sheep"? Rather, just as the sheep scatter and the shepherd gathers them, so were the Israelites in the wilderness, quarreling and weeping and complaining at every hour, as it is said (Psalms 78:40): "How often did they defy Him in the wilderness" etc. The Holy One, blessed be He, as it were, did not depart from them, but led them like sheep, as it is said: "Then Moses had Israel journey."
Moses Leads Israel Through the Wilderness Like a Shepherd His Sheep
Midrash Tanchuma Buber, Beshalach 15:1
ויסע משה את ישראל וגו' (שמות טז כב), זש"ה ויסע כצאן עמו (תהלים עח נב), למה כצאן, אלא מה הצאן מתפזרה והרועה מכנסה, כך היו ישראל במדבר מתלחמין ובוכים ומתרעמים בכל שעה, שנאמר כמה ימרוהו במדבר וגו' (שם שם מ), כביכול לא נסתלק מעליהם הקב"ה אלא ניהגם כצאן, שנאמר ויסע משה.