This paper describes how irrational thinking (i.e., self-control disfunctional behavior) originates and develops, in spite of the aversive consequences of apparent behavior. Functional Analysis of irrational thinking, as that of any other behavior, requires a description of its contingencies of reinforcement. We propose a new kind of primary reinforcement for cognitive behavior of self-control: a credible production of order, where order is understood as a reduction of complexity and uncertainty. This is also to be credible; that is, coherent with other interpretations available for the subject in a given context -which might also be an emotional context. We also expound the implication of notions such as self-esteem and illusion of control, adequately operativized. The difficulty of extinction of irrational thinking is faced by behaviorist methods -applied to the cognitive realm- and is enlightened by the procedure of Rational Emotive Therapy. The clarification of basic principles of learning involved in irrational thinking will contribute to managing the most resistant disorders for treatment, and in relapse prevention.