Doing things for personal gain only and not for other's sake is indeed not a virtue
It's called selfishness
To do good for personal gain and not for its own sake is not virtue. It is rational to be charitable and love one's fellow-creature, and to adjust one's conduct, acts, and words to what is in itself reasonable. ... The prudent man is sparing in words and faithful in keeping secrets.
This is direct translation of the complete text of the Kartilya from Tagalog by Epifanio delos Santos