[2:246] Have you not seen the council of the Children of Israel after Moses, when they said to a prophet of theirs, 'Send for us a king, and we will fight in God's way'. He said, 'Might it be that if fighting is prescribed for you, you will not fight?'
They took on the matter by their own choice (ikhtiyār) and demanded that their prophet ask permission for them to fight. When they were granted what they were themselves answerable to, they turned to laziness (takāsul), and veered off course into their familiar territories of desertion (takhādhul) and knowing neglect (taghāful). It is said they did show strength and rigor in fighting to defend their possessions and their dwellings since:
[2:246 cont'd] They said, 'Why should we not fight in God's way, when we have been expelled from our habitations and our children?' Yet when fighting was prescribed for them, they turned their backs, except a few of them; and God has knowledge of the evildoers.
But because of [their motive] they did not achieve their objective because their resolve was not purely for the right of God. If they had said, 'Why should we not fight in the way of God for He has commanded us, and made [this] an obligation to us? He is our Chief and Protector, and His command is binding on us', then perhaps they would have fully achieved what they had set out to do.