We develop a novel bounded rationality model of imperfect reasoning as the interaction between automatic (System 1) and analytical (System 2) thinking. In doing so, we formalize the empirical consensus of cognitive psychology using a structural, constrained-optimal economic framework of mental information acquisition about the unknown optimal policy function. A key result is that agents reason less (more) when facing usual (unusual) states of the world, producing state- and history-dependent behavior. Our application is an otherwise standard incomplete markets model with no a priori behavioral biases. The ergodic distribution of actions and beliefs is characterized by endogenous learning traps, where locally stable state dynamics generate familiar regions of the state space within which behavior appears to follow memory-based heuristics. This results in endogenous behavioral biases that have many empirically desirable properties: the marginal propensity to consume is high even for unconstrained agents, hand-to-mouth status is more frequent and persistent, and there is more wealth inequality than in the standard model.