Numbers 31:29

Take it of their half, and give it unto Eleazar the priest, for an heave offering of the LORD.

The instruction belonged to God's command to take vengeance on Midian for leading Israel into sin. The army that carried out that judgment received its own allotted half of what was taken. From that soldiers' portion a share was to be set apart for Eleazar the priest as an offering devoted to the Lord.