Jewish tradition understands that the passages of the Tanakh are not always presented in chronological order. According to Rashi, this story (along with the narrative of Micha’s idol) occurred at the beginning of the era of the Judges. Rabbi Shlomo Aviner suggests that these narratives were placed here, at the end of the book, as another reminder of the sad results of having no king: disunity, disorder and violence. Seeing these repeated tragedies at the end of the book of Shoftim highlights the importance of the rise of the monarchy, described in the next book, Shmuel. Though the contemporary State of Israel has no king, Rabbi Abraham Isaac Kook says that a democratically elected Jewish government has a status similar to that of a monarchy. The Jewish people are fortunate that the State of Israel has a set and ordered government to protect society and to care for the nation.
Source: Israel in the News