The judges were for the time when the Jews had come out of Egypt. They had no king and had just received the commandments at Sinai. They were under God’s rules until they rejected that rule and demanded a king.
That’s the common thing of any organization including government, that rules only work by agreement of the people. Having a system of judges would be no different.