רַ֗ק לְמַ֙עַן֙ דַּ֚עַת דֹּר֣וֹת בְּנֵֽי־יִשְׂרָאֵ֔ל לְלַמְּדָ֖ם מִלְחָמָ֑ה רַ֥ק אֲשֶׁר־לְפָנִ֖ים לֹ֥א יְדָעֽוּם׃
only that the generations of the children of Israel might know, to teach them war, at the least such as beforetime knew nothing thereof;
Read midrashic interpretation of Judges 3:2: and classical rabbinic exegesis.