The story is the following
When Samuel grew old, he appointed his sons as Israel’s leaders.[a] 2 The name of his firstborn was Joel and the name of his second was Abijah, and they served at Beersheba. 3 But his sons did not follow his ways. They turned aside after dishonest gain and accepted bribes and perverted justice.
4 So all the elders of Israel gathered together and came to Samuel at Ramah. 5 They said to him, “You are old, and your sons do not follow your ways; now appoint a king to lead[b] us, such as all the other nations have.”
Samuel, being a nepotist himself, installed his sons as judges.
Samuel's sons are bribe able. They got bribed and we know what that means.
I can imagine many businessmen manage to condemn their competitors to death by bribing judges. Many people end up becoming slaves because the judge accept that they owe a million dinar or accept plaintif's frivolous lawsuits. Well, bribed judges. What do we expect? Chrony capitalism.
Obviously the israelites are enraged. So they ask for a king.
Instead of thinking, "Oh boy. Those judges sucks." Hashem think, "the israelites are wrong for asking for a king. They rejected me."
Well duh? Hashem is a God that install this system resulting in these corrupt judges being installed. Of course the israelites complain and want some "solutions".
Hashem even defend Samuel by saying, "They didn't reject you, they reject me." Look, this Samuel guy, directly installed corrupt judges, not based on merit but based on nepotism, and well, messed things up. Rejecting Samuel is a very rational thing to do.
What would you do if Donald Trump installed his son as Supreme Court Nominee and actively and openly accepting bribes? You would have demand something too right?
That doesn't make sense. Any normal person would think Hashem would at least address the corruption problem first before condemning a legitimate complain and it's solution. Hashem, could, for example, change the judge selection process, introduce jury duty, prohibit nepotism, or I don't know, do make better laws than the current system that result in corruptible judges.
Instead Hashem condemn Israelites for asking for a solution.