וַיִּשְׁמַ֤ע אֱלִיאָב֙ אָחִ֣יו הַגָּד֔וֹל בְּדַבְּר֖וֹ אֶל־הָאֲנָשִׁ֑ים וַיִּֽחַר־אַף֩ אֱלִיאָ֨ב בְּדָוִ֜ד וַיֹּ֣אמֶר ׀ לָמָּה־זֶּ֣ה יָרַ֗דְתָּ וְעַל־מִ֨י נָטַ֜שְׁתָּ מְעַ֨ט הַצֹּ֤אן הָהֵ֙נָּה֙ בַּמִּדְבָּ֔ר אֲנִ֧י יָדַ֣עְתִּי אֶת־זְדֹנְךָ֗ וְאֵת֙ רֹ֣עַ לְבָבֶ֔ךָ כִּ֗י לְמַ֛עַן רְא֥וֹת הַמִּלְחָמָ֖ה יָרָֽדְתָּ׃
Y oyéndole hablar Eliab su hermano mayor con aquellos hombres, Eliab se encendió en ira contra David, y dijo: ¿Para qué has descendido acá? ¿y á quién has dejado aquellas pocas ovejas en el desierto? Yo conozco tu soberbia y la malicia de tu corazón, que para ver la batalla has venido.
Akeidat Yitzchak
Midrash Rabbah Shemot 2, interprets Proverbs 30,5, "Every utterance of G-d is refined and pure," to mean that G-d does not grant man elevated status until such man has been examined in trivial matters and has passed such examination. So it was, for instance, with David, who let his sheep graze in the desert so as not to benefit from robbery, i.e grass owned by some individual. His brother Eliav had said to him, "Why did you abandon the few sheep in the desert?" (Samuel I 17,28). G-d said to David, "Since you have been faithful concerning the sheep, come and be in charge of My sheep" (Psalms 68). We also find that Moses led the sheep behind the desert to remove himself from suspicion of stealing. Subsequently, G-d took Moses to tend His people. See Psalms 77, "You have guided Your people like sheep at the hands of Moses and Aaron."
Netivot Olam
And in the chapter of ‘These are the Words’ (Pesachim 66b): Rabbi Shimon ben Lakish said: any person that becomes angry: if he is a wise man, his wisdom departs from him; if he is a prophet, his prophecy departs from him. If he is a wise man his wisdom departs from him – as it is written (Numbers 31:14), “And Moses was wroth with the officers of the host”, and it says (Numbers 31:21) “And Eleazar the priest said…”, implying that it (the wisdom/laws) became hidden from Moses. If he is a prophet his prophecy departs from him – from Elisha, as it is written (II Kings 3:14): “…surely, were it not that I regard the presence of Jehoshapat the king of Judah, I would not look toward thee, nor see thee,” and it is written (II Kings 3:15): “But now bring me a minstrel.’ And it came to pass, when the minstrel played, that the spirit [hand] of the LORD came upon him.” Rabbi Mani the son of Patish said: any person who becomes angry, even if he is destined for greatness from the heavens is lowered. From where do we know this? From where do we know this? From Eliab, as it is written (I Samuel 17:28) “and Eliab’s anger was kindled against David and he said..,”, and when Shmuel went to anoint him with reference to all of [David’s brothers] it is written, (I Samuel 16:8) "