The attraction effect reveals that people do not compare alternatives independently of one another. Instead, they make comparisons, such that preferences between two alternatives can be reversed by adding or removing otherwise irrelevant alternatives. This behaviour is particularly difficult for rational models of decision making to explain since such models require the independent evaluation of alternatives. As such these models describe preference reversal behaviour as irrational. This thesis examines what rational decision making should look like once a person's cognitive bounds have been taken into account. The key finding is that contextual preference reversals like the attraction effect, far from being irrational, actually result from people making better decisions than they would if they assessed alternatives independently of one another. The research was grouped into three objectives concerning the attraction effect and the rationality of human cognition. The first of these was to identify under what conditions people exhibit the attraction effect, and what consequences the behaviour has for the outcomes they experience. Two experiments revealed that the effect is only exhibited in choice sets where alternatives are approximately equal in value and therefore hard to tell apart. This finding also means that the potential negative consequences of exhibiting the attraction effect are very small, because it only occurs when alternatives are similar in value. The second objective was to develop a computationally rational model of the attraction effect. Computational rationality is an approach that identifies what the optimal behaviour is given the constraints imposed by cognition, and the environment. Our model reveals why people exhibit the attraction effect. With the assumption that people cannot calculate expected value perfectly accurately, the model shows that in choices between prospects, the attraction effect actually results in decisions with a higher expected value. This is because noisy expected value estimates can be improved by taking into account the contextual information provided by the other alternatives in a choice set. The final objective was to provide evidence for our model, and the computational rationality approach, by making a novel prediction. We conducted an experiment to test the model's prediction that the attraction effect should be much reduced in the loss domain. We replicated existing attraction effect studies and extended them to the loss domain. The results replicated previous results in the gain domain and simultaneously revealed the novel finding that people did not exhibit the effect in the loss domain. People exhibit the attraction effect as a result of making the best decision possible given the cognitive resources they have. Understanding decision making as computationally rational can provide deep insights into existing phenomena. The method allows us to ascertain the causal link between cognitive mechanisms, a person's goal, and their decision making.