As soon as the ark of the covenant of the LORD came into the camp, all Israel gave a mighty shout, so that the earth resounded.
The first words of this paragraph, which relate to Samuel, that his word came to all Israel, seem not to have any reference to the following story, as if it was by any direction of his that the Israelites went out against the Philistines.
Commenting on 1 Samuel 4:1-9
And when the ark of the covenant of the Lord came into the camp,.... Being brought thither by the men that carried it: all Israel shouted with a great shout, so that the earth rang again; this they did as now sure of victory, because of the ark, and to give spirit and courage to each other to go forth to battle, and to strike a panic into their enemies.
All Israel shouted - Had they humbled themselves, and prayed devoutly and fervently for success, they would have been heard and saved. Their shouting proved both their vanity and irreligion.