The pattern
for each of the {number} {nouns}
is a kind of iterator: each item in the set of items is visited in turn.
There are six children in your group. For each of the children, assemble a packet with a ruler, a pencil, an eraser, and a compass.
You need, in all, six rulers, six pencils, six erasers, and six compasses.
Your sentence starts with the total, and then explains how we reached the total:
70 colored balls are placed in an urn, 10 for each of the seven rainbow colors.
That is, 70 colored balls are placed in an urn, 10 [balls] for each of the seven rainbow colors.
Here it is in the form of an instruction:
For each of the seven rainbow colors, place ten balls of that color in the urn.