(Exodus 17:9:) "And Moses said to Joshua: Choose men for us, and so forth." And why to Joshua? In order to urge him on. (Ibid.:) "And go out, fight against Amalek." Joshua said: How many great ones there are here—Aaron and Hur and the seventy elders—yet he spoke only to me! What is upon me to do but to fulfill his decree? Immediately (ibid. 17:10): "And Joshua did, and so forth."
Why Moses Chose Joshua to Fight Amalek
Midrash Tanchuma Buber, Yitro 4:3
ויאמר משה אל יהושע בחר לנו אנשים וגו' (שם שם ט), ולמה ליהושע בשביל לזרזו, וצא הלחם בעמלק (שם), אמר יהושע, כמה גדולים יש כאן, אהרן וחור וע' זקנים לא אמר אלא לי, מה עי לעשות לקיים גזירתו, מיד ויעש יהושע וגו' (שם שם י).