Following a major military triumph, the people gather to express their deep gratitude to God through a massive sacrifice. The timing of this event is highly specific, taking place on the exact day the nation secured their victory and arrived safely back in Jerusalem [רש״י].
The primary approach among commentators is that the animals used for this offering are not taken from the people's personal flocks. Instead, they are selected directly from the massive amount of loot brought back from the campaign. Out of all the captured property, the people specifically set aside seven hundred cattle and seven thousand sheep to offer to God. These animals are entirely spoils of war, captured directly from the tents of the defeated enemy during the preceding battles [רש״י].