Heuristics and biases program described some behaviors of human decision making as adaptive pre-rational tools that lead to different kinds of structural cognitive errors. Some criticism on this program relay over the absence of theoretical and mechanistic models of heuristics. Cognitive errors in medical diagnosis are widely described as biases provoked by the use of heuristics in realistic clinical frameworks. Here we show that associative memory models instructed to perform medical diagnosis by capturing frequencies from the environment display the same biases observed in clinical practice. This suggests that the mechanism underlying heuristics and biases could be of associative nature. In addition, the mathematics of the model links its performance with Bayesian inference. We find valuable to consider the possibility that the associative nature of human memory could be acting as a unifying mechanism explaining both heuristics and biases and Bayesian inference.