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
That wah all Dey had
They are executed for an alleged connection with the 'Cavite Mutiny'. They are thought to be the leaders of the said group.