Question: If all sin is rebellion against God, why would some people say that idolatry is the worst sin?
Answer: Greetings and thank you for your question. Your question gets at the heart of an issue many Christians (and non-Christians) have with how the Bible presents things. Let me first provide a human example to get at the biblical truth regarding sin and God's attitude toward it.
In our justice system, we have laws and established penalties for breaking these laws. We have laws against jaywalking, laws against theft, laws against assault and battery, and laws against murder (to name a few). If I were to violate any one of those laws, I would be, in the literal sense of the word, a "law breaker," right? It doesn't matter whether my violation is jaywalking or murder, I would be a law breaker. Now, according to our justice system, the penalties for my law breaking will vary considerably. If I get busted for jaywalking, I might get off with a warning or a written citation and pay a small fine. The penalties increase if the law being broken is theft, assault and battery, and, finally, murder. I will be threatened with serious fines and penalties, jailtime, and, depending on which state you live in, the death penalty. So, it should be clear from this human example, that while violations of any of these laws makes one a law breaker, the penalties vary due to the severity of the violation (we could also consider whether intent is involved, but I feel the point has been made).
If this is true at the human level, it's even more true (and perfectly true) on the divine level. At the most basic level, sin is violating, or trespassing, the law of God. The apostle John puts it as plainly as can be put, when he says, "Whoever commits sin also commits lawlessness, and sin is lawlessness" (1 John 3:4 NKJV). The apostle James says a similar thing when he says, "For whoever shall keep the whole law, and yet stumble in one point, he is guilty of all. For He who said, 'Do not commit adultery,' also said, 'Do not murder.' Now if you do not commit adultery, but you do murder, you have become a transgressor of the law" (James 2:10-11 NKJV). James makes the point I was making in the human example above: If you break any of the commandments of God, you are a "transgressor of the law" as a whole. The penalty for violating the law of God is death, as the apostle Paul says, "For the wages of sin is death" (Romans 6:23a NKJV).
Having established that all sin is a violation of God's law and that all sin receives the wages of death, is there anyway we can say some sins are worse than others? I believe so, and I believe the Bible also makes this case as well. Consider the following passage from the Gospel of Matthew:
[20] Then He began to rebuke the cities in which most of His mighty works had been done, because they did not repent: [21] "Woe to you, Chorazin! Woe to you, Bethsaida! For if the mighty works which were done in you had been done in Tyre and Sidon, they would have repented long ago in sackcloth and ashes. [22] "But I say to you, it will be more tolerable for Tyre and Sidon in the day of judgment than for you. [23] "And you, Capernaum, who are exalted to heaven, will be brought down to Hades; for if the mighty works which were done in you had been done in Sodom, it would have remained until this day. [24] "But I say to you that it shall be more tolerable for the land of Sodom in the day of judgment than for you." (Matthew 11:20-24 NKJV)
It is clear that Jesus is teaching there are degrees of punishment. He condemns the cities of Chorazin, Bethsaida, and Capernaum for failing to repent and believe in Jesus and His Kingdom message. He says it will be "more tolerable" for Tyre, Sidon, and Sodom in the judgment than for them. Why? Because they would have repented at the preaching of Jesus. The principle here is with more knowledge comes more responsibility. We also know from passages such as Revelation 20:11-15 that judgment will be based on works. The books that are opened on judgment day are the books that contain a record of all we've said and done. This indicates there will be levels of punishment in hell.
So, getting to your question regarding idolatry. I won't argue whether or not idolatry is the worst sin, but it is pretty bad (I might argue pride, but then perhaps pride is a form of self-idolatry). If you consider what idolatry is it's putting the creature ahead of the Creator (Romans 1:25). Idolatry is a violation of the first & second commandments. When an expert in the law asked Jesus which is the greatest commandment, His answer was, "You shall love the Lord your God with all your heart, soul, strength, and mind." This is basically a summary of the first four commandments. If this is the greatest commandment, then idolatry is a violation of the greatest commandment. Thus, I would expect the punishment to be more severe for idolatry than any (or most) other commandments. Human beings were made to worship God, this is our primary purpose. Idolatry twists that purpose and directs it to things that are not worthy of worship.
So, I would say that while all sin is a violation of God's law and punishable by death, idolatry is a particularly vile sin and worthy of greater punishment because it perverts the purpose for which we were made.
I hope this helps.