A greater good is one that pertains to supererogation. But vows are not only about matters of supererogation, but also about matters of salvation: thus in Baptism men vow to renounce the devil and his pomps, and to keep the faith, as a gloss observes on Ps.
 Thomas Aquinas, Summa Theologica (1274). copy citation

add
Author Thomas Aquinas
Source Summa Theologica
Topic salvation faith
Date 1274
Language English
Reference
Note Translated by Fathers of the English Dominican Province
Weblink http://www.gutenberg.org/cache/epub/18755/pg18755-images.html

Context

“When, however, he promises, he already sets about doing, although he does not yet fulfil his promise: even so, he that puts his hand to the plough does not plough yet, nevertheless he stretches out his hand for the purpose of ploughing. _______________________
SECOND ARTICLE [II-II, Q. 88, Art. 2]
Whether a Vow Should Always Be About a Better Good?
Objection 1: It would seem that a vow need not be always about a better good. A greater good is one that pertains to supererogation. But vows are not only about matters of supererogation, but also about matters of salvation: thus in Baptism men vow to renounce the devil and his pomps, and to keep the faith, as a gloss observes on Ps. 75:12, "Vow ye, and pay to the Lord your God"; and Jacob vowed (Gen. 28:21) that the Lord should be his God. Now this above all is necessary for salvation. Therefore vows are not only about a better good.
source