We advance an account that grounds cognition, specifically decision-making, in an activity all organisms as autonomous systems must perform to keep themselves viable—controlling their production mechanisms. Production mechanisms, as we characterize them, perform activities such as procuring resources from their environment, putting these resources to use to construct and repair the organism's body and moving through the environment. Given the variable nature of the environment and the continual degradation of the organism, these production mechanisms must be regulated by control mechanisms that select when a production is required and how it should be carried out. To operate on production mechanisms, control mechanisms need to procure information through measurement processes and evaluate possible actions. They are making decisions. In all organisms, these decisions are made by multiple different control mechanisms that are organized not hierarchically but heterarchically. In many cases, they employ internal models of features of the environment with which the organism must deal. Cognition, in the form of decision-making, is thus fundamental to living systems which must control their production mechanisms.