The environmental complexity hypothesis suggests that cognition evolves to allow animals to negotiate a complex and changing environment. By contrast, signal detection theory suggests cognition exploits environmental regularities by containing biases (e.g. to avoid dangerous predators). Therefore, two significant bodies of theory on cognitive evolution may be in tension: one foregrounds environmental complexity, the other regularity. Difficulty in reconciling these theories stems from their focus on different aspects of cognition. The environmental complexity hypothesis focuses on the reliability of sensors in the origin of cognition, while signal detection theory focuses on decision making in cognitively sophisticated animals. Here, we extend the signal detection model to examine the joint evolution of mechanisms for detecting information (sensory systems) and those that process information to produce behaviour (decision-making systems). We find that the transition to cognition can only occur if processing compensates for unreliable sensors by trading-off errors. Further, we provide an explanation for why animals with sophisticated sensory systems nonetheless disregard the reliable information it provides, by having biases for particular behaviours. Our model suggests that there is greater nuance than has been previously appreciated, and that both complexity and regularity can promote cognition.