St. Thomas considers memory to be a part of prudence. This is because prudence deals with contingent things, and so it does not focus on what is true always but rather on what is true in most cases. But to know what is true in most cases requires experience, and what is experience if not the memory of many things?
Now, prudence and the moral virtues are related. The moral virtues cannot be without prudence, since living in accord with the moral virtues requires more than just being directed towards their ends. It also requires that we make the correct choices necessary to achieve these ends, and it is the virtue of prudence that directs these choices. Yet it is also true that prudence cannot exist without the moral virtues, since the making of correct choices requires that there first be a proper end that we are trying to achieve, and it is the moral virtues habituate man's actions towards a proper end.
Now, following Cicero, St. Thomas classifies memory as a part of prudence (ST II-II, 48, 1 corpus). This is because prudence comes from both experience and time, and we acquire experience through memory (ST II-II, 49, 1 corpus).
Now, politics is a species of ethics. It is a practical science aimed at directing the actions of men, insofar as they act as and are members of a community. And practical sciences require practical wisdom, or prudence.
Now, as previously stated, prudence requires memory. But a community may be hundreds of years old, even if those in charge of governing it are not. Now, if those in charge of governing the community rely only on there own memories to guide their actions, they may repeat many mistakes that the community has already suffered and try to solve problems that have already been solved.
This is were tradition comes in. Tradition, which is the sum of the way things have been done in a community and the stories behind why these things have been done the way they have, is like the community's memory. Tradition shows those who govern the community how the community responded to certain situations previously, and what the outcomes of those situations were.
Now, this does not imply that those who govern a community must act exactly as the tradition says. Memory is a part of prudence, but it is not all of prudence. There are many reasons that the tradition may have to be modified. Perhaps the situation that the tradition has previously worked well in has changed. Perhaps the tradition did not meet the needs of the common good as well as it needed too. In such cases the prudent option would be to modify the tradition as seems necessary.
Tradition, however, must develop organically. The natural virtues are means between the extremes of too much and too little. If we miss the mark, prudence is the virtue that allows us to modify our actions so that the next time we act we will be closer to the mean that is the virtue. Memory gives prudence the necessary experience needed to correctly modify our actions.
If we throw out tradition, rather than adjust it as necessary to the community's current circumstances, it will have the same effect on the community as the loss of memory would have on an individual. The community would no longer have the necessary experience to act with prudence, and will instead be forced to try to acquire it all over again.