Past mistakes, future salvation[1]
כי פור המן נהפך לפורנו, צדיק נחלץ מיד רשע, אויב נתן תחת נפשו
For Haman’s lot was flipped to our Purim, a righteous one was saved from the hand of the wicked, and an enemy was substituted for him[2]
It’s clear from the book of Shmuel that the primary sin of king Shaul was that he didn’t listen to the mitzvos of Hashem with temimus, innocent and pure loyalty. Rather, he made all kinds of calculations. He was commanded to annihilate every member of the wicked nation of Amalek, including their animals. Instead, he kept the fatty animals for offerings to Hashem, and he spared the king of Amalek, Agag, to execute him later[3]. The intent seemingly was to publicly disgrace him, to create a great Kiddush Hashem. It would demonstrate the tremendous victory of the Jews over their arch enemy.