The New Jerusalem Bible
7:3 Coming back to Joshua, they said, 'There is no need for the whole people to go up; let some two or three thousand go and attack Ai. Spare the whole people such an effort; there are only a few of them!'
I was going to share my own thoughts, but upon finding Calvin's on the verses, he tends to say things A LOT better than me haha so here are his thoughts:
But the children of Israel committed, etc Reference is made to the crime, and indeed the secret crime, of one individual, whose guilt is transferred to the whole people; and not only so, but punishment is at the same time executed against several who were innocent. But it seems very unaccountable that a whole people should be condemned for a private and hidden crime of which they had no knowledge. I answer, that it is not new for the sin of one member to be visited on the whole body. Should we be unable to discover the reason, it ought to be more than enough for us that transgression is imputed to the children of Israel, while the guilt is confined to one individual. But as it very often happens that those who are not wicked foster the sins of their brethren by conniving at them, a part of the blame is justly laid upon all those who by disguising become implicated in it as partners. For this reason Paul, (1 Corinthians 5:4-6) upbraids all the Corinthians with the private enormity of one individual, and inveighs against their pride in presuming to glory while such a stigma attached to them. But here it is easy to object that all were ignorant of the theft, and that therefore there is no room for the maxim, that he who allows a crime to be committed when he can prevent it is its perpetrator. I certainly admit it not to be clear why a private crime is imputed to the whole people, unless it be that they had not previously been sufficiently careful to punish misdeeds, and that possibly owing to this, the person actually guilty in the present instance had sinned with greater boldness. It is well known that weeds creep in stealthily, grow apace and produce noxious fruits, if not speedily torn up. The reason, however, why God charges a whole people with a secret theft is deeper and more abstruse. He wished by an extraordinary manifestation to remind posterity that they might all be criminated by the act of an individual, and thus induce them to give more diligent heed to the prevention of crimes.
1 But the children of Israel committed a trespass in the accursed thing: for Achan, the son of Carmi, the son of Zabdi, the son of Zerah, of the tribe of Judah, took of the accursed thing: and the anger of the Lord was kindled against the children of Israel.
2 And Joshua sent men from Jericho to Ai, which is beside Bethaven, on the east of Bethel, and spake unto them, saying, Go up and view the country. And the men went up and viewed Ai.
3 And they returned to Joshua, and said unto him, Let not all the people go up; but let about two or three thousand men go up and smite Ai; and make not all the people to labour thither; for they are but few.
4 So there went up thither of the people about three thousand men: and they fled before the men of Ai.
5 And the men of Ai smote of them about thirty and six men: for they chased them from before the gate even unto Shebarim, and smote them in the going down: wherefore the hearts of the people melted, and became as water.
The comment I posted yesterday from Calvin's commentary dealt only with verse 1 of Chapter 7. I will post the rest of his comments with one main goal at doing so, that others may see the beautiful work of God through men, like Calvin, who dedicated their lives to the pursuit of rightly dividing God's word. The English is old English and presents some challenges when reading, but is worth investing time to digest it.
I promise not to inundate the forums with such lengthily comments, especially when they are not from ones own study, but again I think is a good thing for us to be reminded of the beauty that God can grant us when we dedicate our lives to him. Hopefully it will ignite a desire to know God better in others, as it does in me.
Calvin: Nothing, therefore, is better than to keep our minds in suspense until the books are opened, when the divine judgments which are now obscured by our darkness will be made perfectly clear. Let it suffice us that the whole people were infected by a private stain; for so it has been declared by the Supreme Judge, before whom it becomes us to stand dumb, as having one day to appear at his tribunal. The stock from which Achan was descended is narrated for the sake of increasing, and, as it were, propagating the ignominy; just as if it were said, that he was the disgrace of his family and all his race. For the writer of the history goes up as far as the tribe of Judah. By this we are taught that when any one connected with us behaves himself basely and wickedly, a stigma is in a manner impressed upon us in his person that we may be humbled -- not that it can be just to insult over all the kindred of a wicked man, but first, that all kindred may be more careful in applying mutual correction to each other, and secondly, that they may be led to recognize that either their connivance or their own faults are punished.
A greater occasion of scandal, fitted to produce general alarm, was offered by the fact of the crime having been detected in the tribe of Judah, which was the flower and glory of the whole nation. It was certainly owing to the admirable counsel of God, that a pre-eminence which fostered the hope of future dominion resided in that tribe. But when near the very outset this honor was foully stained by the act of an individual, the circumstance might have occasioned no small disturbance to weak minds. The severe punishment, however, wiped away the scandal which might otherwise have existed; and hence we gather that when occasion has been given to the wicked to blaspheme, the Church has no fitter means of removing the opprobrium than that of visiting offences with exemplary punishment.
2. And Joshua sent men from Jericho, etc To examine the site of the city and reconnoiter all its approaches was an act of prudence, that they might not, by hurrying on at random through unknown places, fall into an ambuscade. But when it would be necessary shortly after to advance with all the forces, to send forward a small band with the view of taking the city, seems to betray a want of military skill. Hence it would not have been strange that two or three thousand men, on a sudden sally were panic-struck and turned their backs. And it was certainly expedient for the whole body that twenty or thirty thousand should have spread in all directions in foraging parties. We may add, that even the act of slaying, though no resistance were offered, was of itself sufficient to wear out a small body of troops. Therefore, when the three thousand or thereabouts were repulsed, it was only a just recompense for their confidence and sloth. The Holy Spirit, however, declares that fewness of numbers was not the cause of the discomfiture, and ought not to bear the blame of it. The true cause was the secret counsel of God, who meant to show a sign of his anger, but allowed the number to be small in order that the loss might be less serious. And it was certainly a rare display of mercy to chastise the people gently and without any great overthrow, with the view of arousing them to seek an instant remedy for the evil. Perhaps, too, the inhabitants of Ai would not have dared to make an attack upon the Israelites had they advanced against the city in full force. The Lord therefore opened a way for his judgment, and yet modified it so as only to detect the hidden crime under which the people might otherwise have been consumed as by a lingering disease.
But although there is nothing wonderful in the defeat of the Israelites, who fought on disadvantageous terms on lower ground, it was, however, perfectly obvious that they were vanquished by fear and the failure of their courage before they came to close quarters; for by turning their backs they gave up the higher ground and retired to the slope of a valley. The enemy, on the other hand, showed how thoroughly they despised them by the confidence and boldness with which they ventured to pursue the fugitives at full speed in the direction of their camp. In the camp itself, such was the trepidation that all hearts melted. I admit, indeed, that there was cause for fear when, after having gained so many victories as it were in sport, they saw themselves so disgracefully defeated. In unwonted circumstances we are more easily disturbed. But it was a terror from heaven which dismayed them more than the death of thirty men and the flight of three thousand.
6. And Joshua rent his clothes, etc Although it was easy to throw the blame of the overthrow or disgrace which had been sustained on others, and it was by no means becoming in a courageous leader to be so much cast down by the loss of thirty men, especially when by increasing his force a hundred-fold it would not have been difficult to drive back the enemy now weary with their exertions, it was not, however, without cause that Joshua felt the deepest sorrow, and gave way to feelings bordering on despair. The thought that the events of war are doubtful -- a thought which sustains and reanimates the defeated -- could not be entertained by him, because God had promised that they would always be victorious. Therefore when the success did not correspond to his hopes, the only conclusion he could draw was, that they had fought unsuccessfully merely because they had been deprived of the promised assistance of God.
Accordingly, both he and the elders not only gave themselves up to sorrow and sadness, but engage in solemn mourning, as used in the most calamitous circumstances, by tearing their garments and throwing dust on their heads. That mode of expressing grief was used also by the heathen, but was specially appropriate in the pious worshippers of God in suppliantly deprecating his wrath. The rending of the garments and other accompanying acts contained a profession of repentance, as may also be inferred from the annexed prayer, which, however, is of a mixed nature, dictated partly by faith and the pure spirit of piety, and partly by excessive perturbation. In turning straightway to God and acknowledging that in his hand, by which the wound was inflicted, the cure was prepared, they are influenced by faith; but their excessive grief is evidently carried beyond all proper bounds. Hence the freedom with which they expostulate, and hence the preposterous wish, Would God we had remained in the desert! 
It is not a new thing, however, for pious minds, when they aspire to seek God with holy zeal, to obscure the light of faith by the vehemence and impetuosity of their affections. And in this way all prayers would be vitiated did not the Lord in his boundless indulgence pardon them, and wiping away all their stains receive them as if they were pure. And yet while in thus freely expostulating, they cast their cares upon God, though this blunt simplicity needs pardon, it is far more acceptable than the feigned modesty of hypocrites, who, while carefully restraining themselves to prevent any confident expression from escaping their lips, inwardly swell and almost burst with contumacy.
Joshua oversteps the bounds of moderation when he challenges God for having brought the people out of the desert; but he proceeds to much greater intemperance when, in opposition to the divine promise and decree, he utters the turbulent wish, Would that we had never come out of the desert! That was to abrogate the divine covenant altogether. But as his object was to maintain and assert the divine glory, the vehemence which otherwise might have justly provoked God was excused.
We are hence taught that saints, while they aim at the right mark, often stumble and fall, and that this sometimes happens even in their prayers, in which purity of faith and affections framed to obedience ought to be especially manifested. That Joshua felt particularly concerned for the divine glory, is apparent from the next verse, where he undertakes the maintenance of it, which had been in a manner assigned to him. What shall I say, he asks, when it will be objected that the people turned their backs? And he justly complains that he is left without an answer, as God had made him the witness and herald of his favor, whence there was ground to hope for an uninterrupted series of victories. Accordingly, after having in the loftiest terms extolled the divine omnipotence in fulfillment of the office committed to him, it had now become necessary for him, from the adverse course of events, to remain ignominiously silent. We thus see that nothing vexes him more than the disgrace brought upon his calling. He is not concerned for his own reputation, but fears lest the truth of God might be endangered in the eyes of the world.  In short, as it was only by the order of God that he had brought the people into the land of Canaan, he now in adversity calls upon him as author and avenger, just as if he had said, Since thou has brought me into these straits, and I am in danger of seeming to be a deceiver, it is for thee to interfere and supply me with the means of defense.