It is often necessary to balance principles. The proper ordering of this habit is called the virtue of prudence.
One of the four cardinal virtues. Definitions of it are plentiful from Aristotle down. His "recta ratio agibilium" has the merits of brevity and inclusiveness. Father Rickaby aptly renders it as "right reason applied to practice". A fuller description and one more serviceable is this: an intellectual habit enabling us to see in any given juncture of human affairs what is virtuous and what is not, and how to come at the one and avoid the other. It is to be observed that prudence, whilst possessing in some sort an empire over all the moral virtues, itself aims to perfect not the will but the intellect in its practical decisions. Its function is to point out which course of action is to be taken in any round of concrete circumstances. It indicates which, here and now, is the golden mean wherein the essence of all virtue lies. It has nothing to do with directly willing the good it discerns. That is done by the particular moral virtue within whose province it falls.
Again, the doctrine that government is constrained only by such considerations, and not by absolute principles which draw a bright line around personal liberties, is the essence of totalitarianism.