The section including chapters 8-16 begins a new part of the story. The people wanted a king, and God chose Saul, the man the people wanted, to be their king. He was not the king Yahweh wanted.
When Samuel was old, he appointed his sons to be judges. They were corrupt and took bribes, so the people came and asked Samuel to appoint a king for them. Samuel asked God, who gave them a king but warned them what a king would be like. Despite Samuel’s warning that a king would oppress them, the people still wanted a king. This was sinful because they were rejecting God as their king. (See: rc://en/tw/dict/bible/kt/appoint, rc://en/tw/dict/bible/other/oppress, rc://en/ta/man/translate/figs-explicit and rc://en/tw/dict/bible/kt/sin)