You can have a system that is rational even if the individual participants are irrational. Among the mechanisms for this are statistical (if any given member of the population frequently makes errors, but the errors average out to the overall rational solution) and selection (if all the irrational people die and drop out of the population, which seems to be the case here).