Abstract: The debate between rational models of behavior and their systematic deviations, often referred to as “irrational behavior”, has attracted an enormous amount of research. Here, we reconcile the debate by proposing an evolutionary explanation for irrational behavior. In the context of a simple binary choice model, we show that irrational behaviors are necessary for evolution in stochastic environments. Furthermore, there is an optimal degree of irrationality in the population depending on the degree of environmental randomness. In this process, mutation provides the important link between rational and irrational behaviors, and hence the variety in evolution. Our results yield widespread implications for financial markets, corporate behavior, and disciplines beyond finance.