I give ALL goblins origins in the Feywild (goblins are Faeries in folklore originally anyway) after the new DMG mentioning they can be found there.
After coming to the Material Plane goblins eventually evolved or (more likely) mutated into hobgoblins, which are smarter and more organized and make excellent soldiers.
Said mutation was magical in nature, and likely involved someone thinking it was a great idea to use mutant goblins as troops against elves. This is why they ALWAYS attack elves and half-elves first; it's sort of programmed into them.
Bugbears are a further mutation coming from hobgoblins that returned to the Feywild, mutating for greater size and cunning but also for preternatural stealth; many mythological evil Faeries display incredible cruelty and magical hiding powers, so that was my basis.
Eventually some bugbears found their way back to the Material Plane, but never very many, which is why they can be frequently found working as scouts and shock-troops for hobgoblins.
The reason they usually never try to take over hobgoblin legions is because the loot and food they get is more then enough to satisfy them; they're REALLY in it for the murder and fear they sow, not conquest like their ancestors. Their time in the Feywild warped them further, left them cruel and mad.