Then, when he says, for rulers, he assigns the reason for what he had said. First, he presents the reason; second, from this reason he draws a useful teaching, at do you will then to not fear the power?; third, he shows the necessity of this teaching, at but if you do evil.
First, therefore, he says: It has been stated that those who resist power, incur damnation, for rulers, who are here called powers, are not a terror, i.e., a cause of terror, to good work, i.e., because of good conduct, but to the evil, i.e., because of bad conduct.
It seems that this should be understood with reference t...o the reason for establishing rulers. For the reason why rulers are established is in order that those who are not inclined by any love of virtue to avoid evil and do good, may do so by fear of punishment: a king who sits on the throne of judgment winnows all evil with his eyes (Prov 20:8). And according to this interpretation it says that rulers are not a terror to good conduct but to bad as regards what rulers do in virtue of their office, as Isaiah says, but the prince will devise such things as are worthy of a prince (Isa 32:8).
This can also refer to evil rulers, who are not a terror to good conduct, but to bad. For even though they sometimes unjustly persecute those who do good, the latter have no reason to fear; because if they endure it patiently, it turns out for their good: even if you do suffer for justice's sake, you will be blessed. Have no fear of them, nor be troubled (1 Pet 3:14).
From what is said here the reason can be assigned why those who resist authority incur condemnation, whether it be the punishment inflicted by rulers on those who rebel, or the damnation by which men are punished by God. For if rulers are a terror to bad conduct, it follows that those who resist their authority are acting wickedly and thus are the cause of their temporal and eternal punishment.
Then when he says, do you will then to not fear, he draws a useful teaching from what he had said, namely, how to avoid the terror of rulers. First, he suggests by his question that this is desirable, saying: do you will then to not fear power? As if to say: this should appeal to a person: as the roar of a lion, so is the terror of a king (Prov 20:2).
Second, he shows how to avoid this fear, saying: do what is good. For it says in Proverbs: righteous lips are the delight of a king (Prov 16:13), and in a psalm: he who walks in the way that is blameless shall minister to me (Ps 101:6).
Third, he shows the effect of this, saying: If you do what is good, you will not only avoid evil but you will have praise from the same. This is obvious when one considers the reason why authority is established. For it is established not only to keep us from evil conduct through fear of punishment but also to induce us to good conduct through rewards, as it says in 1 Peter: be subject to governors as sent by the emperor to punish those who do wrong and to praise those who do right (1 Pet 2:14). This is also true of evil rulers, whose unjust persecution ends in praise for those who endure it patiently: we call those happy who were steadfast (Jas 5:11).
Source: Commentary on Romans