Both in law and in our less formal judgments of others’ actions and our own, we recognize the idea of “diminished capacity”: at the moment of doing the bad thing, not being able to think straight. But there are many things that predictably lead to not being able to think straight: alcohol, too little sleep, titanic anger, strong sexual arousal, etc. Because these predictably affect our judgment, we each bear a responsibility to make sure that at each moment we are either (a) avoiding such states at that moment or (b) set things up–say by prearranging many key things–so as to minimize any harm that might come from distorted judgments in those states. It is appropriate to hold people to account on that responsibility.
John Stuart Mill alludes to that principle in On Liberty “Chapter V: Applications,” paragraph 6:
The right inherent in society, to ward off crimes against itself by antecedent precautions, suggests the obvious limitations to the maxim, that purely self-regarding misconduct cannot properly be meddled with in the way of prevention or punishment. Drunkenness, for example, in ordinary cases, is not a fit subject for legislative interference; but I should deem it perfectly legitimate that a person, who had once been convicted of any act of violence to others under the influence of drink, should be placed under a special legal restriction, personal to himself; that if he were afterwards found drunk, he should be liable to a penalty, and that if when in that state he committed another offence, the punishment to which he would be liable for that other offence should be increased in severity. The making himself drunk, in a person whom drunkenness excites to do harm to others, is a crime against others. So, again, idleness, except in a person receiving support from the public, or except when it constitutes a breach of contract, cannot without tyranny be made a subject of legal punishment; but if, either from idleness or from any other avoidable cause, a man fails to perform his legal duties to others, as for instance to support his children, it is no tyranny to force him to fulfil that obligation, by compulsory labor, if no other means are available.
It would be too great a burden on freedom to punish people for not (a) avoiding states of impaired judgment if they might well be pursuing strategy (b) of arranging things careful so impaired judgment does no harm. But once someone has committed an offense under impaired judgment, the presumption that they are pursuing strategy (b) cannot be held as strongly.
Stepping back, one can consider the human condition in general as one of impaired judgment. Therefore, along the lines of strategy (b), it is our duty to set up social arrangements so that our impaired judgment causes as little trouble as possible. Foremost among such social arrangements is to avoid giving too much power to any one individual. Dictatorship is like drunkenness without any precautions.