Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said that on the day of Badr the Messenger of Allah (peace and blessings be upon him) said: "Whoever does such-and-such will have such-and-such as a reward." So the young men went forward and the old men stayed by the banners, and they remained firmly there. When Allah granted the Muslims victory, the old men said: We were your helpers and your support; had you been defeated, you would have fallen back to us, so it cannot be that you take away the spoils and we are simply left behind. But the young men refused and said: The Messenger of Allah (peace and blessings be upon him) gave it to us. So Allah Almighty revealed the verses from "They ask you about the spoils of war" [Surah al-Anfal: 1] up to "were averse" [Surah al-Anfal: 5]. That was better for them; so obey me, for I know the outcome better.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قسم الفيء والغنيمة / 12712