In contrast with their victory at Jericho, we see an implicit and explicit reason for Israel's defeat at Ai. Israel is defeated explicitly because of the hidden sin in the camp, and it is implied that they are defeated because of Joshua's arrogance in leading without consulting God.