Israel knew Samuel as a righteous man and judge of their nation, but as he grew older, he put his sons in as judges, and that created a problem,
Now it came to pass when Samuel was old that he made his sons judges over Israel. The name of his firstborn was Joel, and the name of his second, Abijah; they were judges in Beersheba. But his sons did not walk in his ways; they turned aside after dishonest gain, took bribes, and perverted justice. Then all the elders of Israel gathered together and came to Samuel at Ramah, and said to him, “Look, you are old, and your sons do not walk in your ways. Now make us a king to judge us like all the nations” (1 Samuel 8.1–5).
The Israelites knew that Samuel was on his way out, but they also knew they needed leadership, and the ones Samuel had put in place to replace him were evil. The people should not have asked for a king, unless the Lord had stated that He wanted His nation to have a king, nevertheless, the bad leaders in Israel, the sons of Samuel, moved the people to make this request.
If you are a leader, be sure always to do what is right, because the people watch you, and you will influence the way your group turns out for the future.