It boils effectively down to whether you believe in free will or in predetermined nature.
I'm firmly in the predetermined camp and thus consider goblins and their ilk (bugbears, hobgoblins, etc.) vermin to be eradicated.
Goblins are basically cruel, destructive, delight in torture those who are weak and/or helpless without any redeeming quality whatsoever.
And you are right. Sapient beings are more patterns of behavior. Should you encounter them in their societies you are totally justified in destroying them because they threaten your own society.
However things get more complicated if you are a Paladin and you come across a Bugbear or whatnot that is 1) away from it's society and 2)has not attacked you.
Like a Goblin you meet in Baldur's Gate that is living in an apartment and goes to work each day - that would be a different story.