The virtues assist us in living according to the good of reason:
[I]t belongs to moral virtue to safeguard the good of reason against the passions that rebel against reason. Now the movement of the soul's passions is twofold, as stated above (I-II, 23, 2), when we were treating of the passions: the one, whereby the sensitive appetite pursues sensible and bodily goods, the other whereby it flies from sensible and bodily evils (emphasis added).We can go wrong in living according to reason by falling off the tightrope, so to speak (if that's not an exaggerated image), in either of two ways - by an inordinate pursuit of bodily goods, or by an inordinate flight from bodily evils. The virtues assist us in staying on the tightrope.
[By way of a digression, it ought to be said that living according to reason in Aquinas' view is not in any way life apart from faith in God. On the contrary, he would say that to be a Christian is pre-eminently reasonable.]
It's not that the passions are just plain evil. To the contrary, we need them - but we need them under the direction of reason.
The first of these movements of the sensitive appetite rebels against reason chiefly by lack of moderation. Because sensible and bodily goods, considered in their species, are not in opposition to reason, but are subject to it as instruments which reason employs in order to attain its proper end: and that they are opposed to reason is owing to the fact that the sensitive appetite fails to tend towards them in accord with the mode of reason. Hence it belongs properly to moral virtue to moderate those passions which denote a pursuit of the good.
On the other hand, the movement of the sensitive appetite in flying from sensible evil is mostly in opposition to reason, not through being immoderate, but chiefly in respect of its flight: because, when a man flies from sensible and bodily evils, which sometimes accompany the good of reason, the result is that he flies from the good of reason. Hence it belongs to moral virtue to make man while flying from evil to remain firm in the good of reason.
The virtues of temperance and fortitude assist us in moderating these passions according to reason.
Accordingly, just as the virtue of fortitude, which by its very nature bestows firmness, is chiefly concerned with the passion, viz. fear, which regards flight from bodily evils, and consequently with daring, which attacks the objects of fear in the hope of attaining some good, so, too, temperance, which denotes a kind of moderation, is chiefly concerned with those passions that tend towards sensible goods, viz. desire and pleasure, and consequently with the sorrows that arise from the absence of those pleasures. For just as daring presupposes objects of fear, so too such like sorrow arises from the absence of the aforesaid pleasures.
It's an error to deny the legitimacy of the passions. Only a fool would ignore his hunger to the point of starving to death; only a fool would fail to step out of the way of the train hurtling towards him. But the passions must be reined in, and the virtues assist us in doing so.