because all of this amounts to taking money in return for assisting in sin and transgression. The ruler is appointed only to enjoin what is right and forbid what is wrong; this is the very purpose of authority. If the ruler allows wrongdoing in return for money he takes = he has acted contrary to that purpose. He is like someone whom you appointed to help you against your enemy, only for him to help your enemy against you, or like someone who took money to fight in the cause of Allah Most High, then used it to fight the Muslims!!
This is further clarified by the fact that the welfare of lands and people depends upon enjoining what is right and forbidding what is wrong (1). Indeed, well-being in this life and the Hereafter (2) lies in obeying Allah and His Messenger, and this cannot be fully achieved except by enjoining what is right and forbidding what is wrong. Through this, this nation became the best nation ever raised for humanity. Allah Most High said: “You are the best nation ever raised for humanity: you enjoin what is right and forbid what is wrong” [The Family of Imran: 110]. He also said: “Let there be among you a community that calls to goodness, enjoins what is right, and forbids what is wrong” [The Family of Imran: 104]. He also said: “The believing men and believing women are allies of one another: they enjoin what is right and forbid what is wrong” [Repentance: 71] (3). Allah Most High said concerning the Children of Israel: “(78) They did not forbid one another from the wrongdoing they committed. Evil indeed was what they used to do” [The Table Spread: 79]. He also said: “(164) Then, when they forgot what they had been reminded of, We saved those who forbade evil and seized the wrongdoers with a dreadful punishment because of what they had been” [The Heights: 165].
Thus Allah Most High stated that when the punishment descended, He saved those who forbade evil,