According to the Mishna (2a) one of the tasks assigned to the Great Sanhedrin of 71 judges is to make a decision regarding embarking on a milḥemet reshut – a war that is not required. The Meiri explains that a milḥemet mitzva – a war that is obligatory – would be one that involves capturing or defending the Land of Israel from its enemies or fighting against the nation of Amalek. Such situations are left to the discretion of the king who will decide if the army should go to war. A war that would engage the Jewish army in a fight between two other countries, would illustrate Israel’s might to its enemies or would stem from economic factors would be a milḥemet reshut that would require a decision to be made by the Great Sanhedrin.
To illustrate this point, the Gemara shares a story about a day in the life of King David, who awoke at midnight and was visited by the elders at dawn. The elders described the need to invigorate the economic base of the people. David’s first suggestion – that the people would do business with each other – was rejected as insufficient with the parables “a single handful of food does not satisfy a lion, and a pit will not be filled merely from its mouth.” Upon hearing their responses, King David suggested calling up the army and going out to war. This was done only after a series of consultations – with the king’s advisor, Aḥitophel, with the Great Sanhedrin and with the prophecy of the Urim VeTummim.
The parable “a pit will not be filled merely from its mouth,” is explained by the Ge’onim as referring to a water pit whose source is rainwater. It is clear that the opening of the pit – its mouth – is not large enough for the water that falls directly into the pit to fill it up. It is therefore necessary for a piping system to be built that will bring water to the pit from a number of other places, as well.