Quran 8:1 Vs 8:41
All soils of war belong to God and His messenger however He took only one fifth of it and rest of allowed to be distributed to the warriors. Since all belonged to Him so He used His authority to made proportions for its distribution.