Samuel said to Saul, Yahweh sent me to anoint you to be king over his people, over Israel: now therefore listen you to the voice of the words of Yahweh.
Some writers try to defend Saul's disobedience, and even commend what they call his humanitarian considerations in sparing Agag, and perhaps a great many others.  However, the ban, the [~cherem], the total destruction of a city, or a people, was widely practiced in those times.  Besides, it was God's command here.