Why did God repent of making Saul king?


Because he failed to kill all of the Amalekites and their animals.

Thus saith the LORD of hosts ... go and smite Amalek, and utterly destroy all that they have, and spare them not; but slay both man and woman, infant and suckling, ox and sheep, camel and ass. 1 Samuel 15:2-3

It repenteth me that I have set up Saul to be king: for he is turned back from following me, and hath not performed my commandments. 1 Samuel 15:11

the LORD sent thee on a journey, and said, Go and utterly destroy the sinners the Amalekites, and fight against them until they be consumed. Wherefore then didst thou not obey the voice of the LORD, but didst fly upon the spoil, and didst evil in the sight of the LORD? 1 Samuel 15:18-19