Divine judgment targets various segments of society, categorizing people by the precise nature of their worship and loyalties. The prophecy first addresses the truly wicked [מלבי״ם]. These individuals would deliberately climb to the rooftops of their homes to bow down and worship the stars and celestial bodies [מצודת דוד, ביאור שטיינזלץ].
Another group faces judgment for attempting to blend conflicting loyalties. These people try to hold onto both ends of the spiritual spectrum by mixing faith in God with idol worship [רד״ק, ביאור שטיינזלץ]. They might make an oath to God, but they quickly follow it up by swearing to an idol, ultimately treating the false god as their primary authority. This behavior is so ingrained that if their peers doubt the sincerity of an oath made in God's name, they immediately offer to swear by the idol instead to prove they are telling the truth [רש״י].
A different perspective views the remaining individuals not as idolaters, but as distinct groups defined by their relationship to human authority. Under this view, one group consists of righteous people who have sworn an oath of absolute loyalty to serve only God [מלבי״ם, אבן עזרא]. Yet, the prophecy warns that even these faithful individuals face the danger of being cut off [מצודת דוד]. In sharp contrast are those who lack any religious faith entirely. They do not worship God, nor do they look to the stars. Instead, their only reverence is for a flesh-and-blood king, and they will only swear by his name [מצודת דוד]. Another angle describes these people as spiritually average individuals lacking a moral backbone. Their beliefs are entirely dictated by royal decree: if the human king chooses to serve God, they will follow suit, but if he turns to idol worship, they will readily trail behind him [מלבי״ם].