וַיַּעֲשׂ֧וּ בְנֵֽי־יִשְׂרָאֵ֛ל אֶת־הָרַ֖ע בְּעֵינֵ֣י יְהוָ֑ה וַיַּעַבְד֖וּ אֶת־הַבְּעָלִֽים׃
이스라엘 자손이 여호와의 목전에 악을 행하여 바알들을 섬기며
Rashi
Yehoshua dismissed, etc. This incident had taken place previously, but, as Scripture intends to relate that they acted wickedly [v.11], it begins with the following statement: at Yehoshua's death, when they resolved, in his presence, to serve Adonoy, he dismissed them, each man to his ancestral property. They served Adonoy throughout his days and the days of the elders. Afterward, "The Bnei Yisroel acted wickedly."
Or HaChaim
Another meaning of the verse is that not only the generation Moses describes in our verse will worship idols but also the following generation. We find in Judges 2,11 that after the death of Joshua and his generation, the Israelites began to worship the Baal. This is what G'd had predicted in our verse when He said to Moses that after he would die this people would rise and stray after alien gods.