First of all, we must clarify some aspects regarding the Hebrew text. What KJV translates as stubbornness, actually what the Hebrew text הַפְצַ֑ר expresses is presumption. What KJV translates as witchcraft (חַטַּאת־קֶ֙סֶם֙) is actually the sin of divination, that while divination is in the realm of sorcery, the text specifically refers to the sin of divination. Then, the correct translation in KJV would remain: "For rebellion is as a sin of divination, and presumption is as idolatry and iniquity."
Starting from that very important point, now we are going to answer the question, and to answer this, we must look at the context. If you look at verse 12, it also has a translation error in KJV, but that is well translated in the New King James Version:
So when Samuel rose early in the morning to meet Saul, it was told
Samuel, saying, “Saul went to Carmel, and indeed, he set up a monument
for himself; and he has gone on around, passed by, and gone down to
Gilgal".
This verse makes it clear that Saul erected a monument to himself, breaking the commandment of Exodus 20:
Thou shalt not make unto thee any graven image, or any likeness of any
thing that is in heaven above, or that is in the earth beneath, or
that is in the water under the earth
.
So, in the expression "and presumption is as idolatry and iniquity" is a reminder comparison of those two sins committed by Saul, because, in the same context we see that Saul had the presumption to forgive Agag and the cattle, because this was not the command given by God. Saul argued in verse 20 that he had obeyed God, but God reminds him that the presumption he had at that time is equal to the idolatry and iniquity of having erected a monument to himself.
Now, the first part: ““ For rebellion is as a sin of divination ”, God uses it to remind Saul when he sinned by offering sacrifice instead of waiting for Samuel to do it, and we see in 1 Samuel 13:12
Therefore said I, The Philistines will come down now upon me to
Gilgal, and I have not made supplication unto the Lord: I therefore
forced myself, and offered a burnt offering.
In this way, Saul thought and supposed (guessed) that the Philistines would come against him, forgetting what God had said through Samuel in 1 Samuel 12: 14-15:
If you fear the Lord and serve him, and listen to his voice, and are
not rebellious to the word of the Lord, and if both you and the king
who reign over you serve the Lord your God, you will do well. But if
you do not listen to the voice of the Lord, and if you are rebellious
to the words of the Lord, the hand of the Lord will be against you as
he was against your fathers.
That is to say, Saul only had to wait for Samuel and obey what God had determined, but his rebellion was equal to his sin of supposing or "guessing" that the Philistines could defeat him and therefore, he hastened to offer sacrifice as if to he would reciprocate that privilege at that time.
In conclusion, this whole sentence: "For rebellion is as a sin of divination, and presumption is as idolatry and iniquity." It is simply God reminding Saul through Samuel of the sins that he has committed."