Samuel judged the people for 20 years trying to show them that they needed to do things God's way.
I Samuel 7:2-4- And it came to pass, while the ark abode in Kirjathjearim, that the time was long; for it was twenty years: and all the house of Israel lamented after the LORD. And Samuel spake unto all the house of Israel, saying, If ye do return unto the LORD with all your hearts, then put away the strange gods and Ashtaroth from among you, and prepare your hearts unto the LORD, and serve him only: and he will deliver you out of the hand of the Philistines. Then the children of Israel did put away Baalim and Ashtaroth, and served the LORD only.
It seemed like the people were now willing to listen to Samuel. They didn't like being at war with their enemies. They wanted to change things, and so they decided to do as God said.
I Samuel 7:5-6- And Samuel said, Gather all Israel to Mizpeh, and I will pray for you unto the LORD. And they gathered together to Mizpeh, and drew water, and poured it out before the LORD, and fasted on that day, and said there, We have sinned against the LORD. And Samuel judged the children of Israel in Mizpeh.
It seems like the moment you decide to do right, the devil steps in to try to stop you!
I Samuel 7:7- And when the Philistines heard that the children of Israel were gathered together to Mizpeh, the lords of the Philistines went up against Israel. And when the children of Israel heard it, they were afraid of the Philistines.
The Philistines had heard that the children of Israel were in place. They thought they could come and wipe them out.
I Samuel 7:8-11- And the children of Israel said to Samuel, Cease not to cry unto the LORD our God for us, that he will save us out of the hand of the Philistines. And Samuel took a sucking lamb, and offered it for a burnt offering wholly unto the LORD: and Samuel cried unto the LORD for Israel; and the LORD heard him. And as Samuel was offering up the burnt offering, the Philistines drew near to battle against Israel: but the LORD thundered with a great thunder on that day upon the Philistines, and discomfited them; and they were smitten before Israel. And the men of Israel went out of Mizpeh, and pursued the Philistines, and smote them, until they came under Bethcar.
When the devil comes at you, the best thing to do is pray and let God deal with it. That is what the children of Israel did! Samuel prayed and offered a sacrifice to God, and God fought the Israelites enemies!
Once the Philistines were on the run, the Israelites attacked them and won the battle.
I Samuel 7:13, 16-17- So the Philistines were subdued, and they came no more into the coast of Israel: and the hand of the LORD was against the Philistines all the days of Samuel. And he went from year to year in circuit to Bethel, and Gilgal, and Mizpeh, and judged Israel in all those places. And his return was to Ramah; for there was his house; and there he judged Israel; and there he built an altar unto the LORD.
Samuel was trying to do what God had called him to do. He was judging Israel. But, even when we are trying to do what God asks it doesn't mean those around us will.
I Samuel 8:1-3- And it came to pass, when Samuel was old, that he made his sons judges over Israel. Now the name of his firstborn was Joel; and the name of his second, Abiah: they were judges in Beersheba. And his sons walked not in his ways, but turned aside after lucre, and took bribes, and perverted judgment.
Even though Samuel tried to always do right, his sons did not. They didn't have the desire to serve God like their father did. Perhaps, it was because they didn't have a love for God in their hearts like their father did.
If you don't learn to love God and serve Him for yourself, you won't do right either. Just because your parents love God, doesn't mean that you will.
And when one person does wrong, it usually encourages others to do wrong.
I Samuel 8:4-5- Then all the elders of Israel gathered themselves together, and came to Samuel unto Ramah, And said unto him, Behold, thou art old, and thy sons walk not in thy ways: now make us a king to judge us like all the nations.
God had provided all of Israel's needs. He was their leader. He was their guide. But, because Samuel's sons did wrong, the people decided they didn't need God to be their leader. The people wanted a king.
I Samuel 8:7, 9- And the LORD said unto Samuel, Hearken unto the voice of the people in all that they say unto thee: for they have not rejected thee, but they have rejected me, that I should not reign over them. Now therefore hearken unto their voice: howbeit yet protest solemnly unto them, and shew them the manner of the king that shall reign over them.
When God rules over you, you have a perfect, sinless Being that only wants what's best for you! But, when a person rules over you, they can make mistakes and be selfish. Samuel was going to point that out to the people.
I Samuel 8:10-11, 13-16 - And Samuel told all the words of the LORD unto the people that asked of him a king. And he said, This will be the manner of the king that shall reign over you: He will take your sons, and appoint them for himself, for his chariots, and to be his horsemen; and some shall run before his chariots. And he will take your daughters to be confectionaries, and to be cooks, and to be bakers. And he will take your fields, and your vineyards, and your oliveyards, even the best of them, and give them to his servants. And he will take the tenth of your seed, and of your vineyards, and give to his officers, and to his servants. And he will take your menservants, and your maidservants, and your goodliest young men, and your asses, and put them to his work.
Samuel tried to tell the Israelites that a king would take their sons to be in his army, and he would take their daughters to work in his castle. He would take their land and their servants to feed his family. And he would take their money to pay for his desires. But, the Israelites wouldn't listen. They decided that a losing their possessions and family was a fair trade for a king.
I Samuel 8:19-22- Nevertheless the people refused to obey the voice of Samuel; and they said, Nay; but we will have a king over us; That we also may be like all the nations; and that our king may judge us, and go out before us, and fight our battles. And Samuel heard all the words of the people, and he rehearsed them in the ears of the LORD. And the LORD said to Samuel, Hearken unto their voice, and make them a king. And Samuel said unto the men of Israel, Go ye every man unto his city.
So Samuel told God what the people wanted, and God said He would show Samuel who to anoint as King. Samuel sent the people home until he was sure who the Lord wanted as King.