The nation of Israel had a valid complaint. Samuel attempted to set his sons up as the 15th and 16th judges in Israel, but they were unworthy of their office. Now, watch this carefully. Samuel's poor judgment occasioned an uprising among the people. In other words, his fault and the faults of his sons gave the people the excuses they needed to fuss and to cause a big political and spiritual ruckus. However, they jumped from a legitimate beef to an illegitimate solution. The failures of Samuel's family were used by Israel to reject God's authority over them and to ask for a human king "...like all the other nations had" - it was not a logical or a wise direction for them.
Notice that God did NOT rebuke Samuel, NOR did He refuse to grant Israel their request. It is reasonable to conclude that the rebellion of the people was punishment enough for Samuel (Jeremiah 2:19) who should have known better than to put his wicked sons in charge of the nation. Unfortunately, sometimes family loyalties eclipse the wisdom of men who would otherwise know better. And, although the people were seeking for a human king at the wrong time and for the wrong reasons, God granted them their petition. This is frightening. At times God gives people what they want even when He knows it isn't what they need (Romans 1:24, 26, 27 & 28).