"And Samuel said, Hath the Lord as great delight in burnt offerings and sacrifices, as in obeying the voice of the Lord? Behold, to obey is better than sacrifice, and to hearken than the fat of rams. For rebellion is as the sin of witchcraft, and stubbornness is as iniquity and idolatry. Because thou hast rejected the word of the Lord, he hath also rejected thee from being king."
Even though it was not God's plan for Israel to have a king, when the people insisted, God gave them the best one He could find. God sent the prophet Samuel to anoint Saul to be the ruler over the people. At the beginning of his reign, Saul was humble and obedient. But as he consolidated his power, he began to view his ideas and desires to be more important than what God said. When Samuel commanded the complete destruction of the Amalekites and all their possessions as God's judgment on them, Saul went out to war. But rather than finish the task, he allowed the people to save the best of the animals of their conquered foes. In those days most of the pay for soldiers was the spoils of battle, but God had made that off limits, just as He had done earlier at the battle of Jericho. Rather than obey God and anger the people, Saul did things his way.
When the prophet Samuel confronted him, Saul first lied to try to cover his disobedience. When Samuel pointed to the evidence that was right in front of his eyes, Saul shifted tactics. Now he explained to the prophet that they were saving the best of the animals to give as a sacrifice to God in celebration of the great victory. That was not true, but even if it had been, it still would not have justified disobedience to God's command. We cannot bargain with God, replacing obedience in one area with a sacrifice in another. We cannot get a pass on sinful behavior by doing other things that are good.
Obedience to God is of paramount importance, and nothing else we can do will take its place.