The priests and the kings in Israel were responsible for justice in the nation (cf. Deuteronomy 17:9; 2 Samuel 15:2-3), though neither group could prevent wickedness from proliferating. The sixth and seventh visions deal with the removal of wickedness. This sixth one deals with the elimination of lawbreakers, and the next one with the removal of wickedness from the land. What God promised in the preceding two visions required the purging predicted in these two visions. [source][source][source]
"At this point the series of visions takes a sharp turn from that which heretofore has been comforting, to a stern warning that the Lord (Yahweh) is a holy God and cannot brook evil." [1][source]
". . . before the blessing of the first five visions will be actualized, there will intervene in the life of the nation a period of moral declension and apostasy. God must and will purge out all iniquity, though He has promised untold glory for the godly in Israel." [2][source]