Liberty is freedom to serve God, not freedom from God. The natural state of man is un-fettered service to God. We are free to serve God. No King was prescribed when the law was given. The law was enforced by the people and ultimately God was rejected by the people. There was no federal government. The tribes were extended families under self-rule under the law of Moses.
At first, the tribes would petition one another when in need (Judges 4:4-6;6:35;20:1). However, the tribes did not come to each other’s aid (5:13-18;8:1), instead they attacked each other (8:16;9:1-56;12:1-6;20:1-48), and personal interests became of greater concern than national (11:5-11).
Morality has a relationship to freedom.The immorality of the people yielded immoral leaders. Immoral leaders approve and promote immoral cultures. The result of Judges was a cycle of increased immorality bringing external oppression and loss of freedom. Once the oppression yielded a heart toward God then he would send a Judge (a kind of tribal Warlord) to restore liberty. The cycle continued over and over until we get to Samuel.
We will see from 1 Samual 8 that God did not give up on the Israelites. They gave up on him.
Samuel was the last judge of Israel. When he grew old he tried to make his sons judges. However his sons were bent toward personal gain, took bribes, and perverted justice (1 Sam 8:1-3). The people rejected the leadership of his sons and asked for a King instead like all the other nations (v4).
Samuel feels rejected but God points out that the immorality of the people have caused them to reject God, not Samuel. The deeds they have done since they came out of Egypt forsaking him to other Gods (v8) is also forsaking their freedom and it's responsibilities.
Go ahead and install a King but warn them about the ways of the King who will now rule over them.
What are the ways of a King: