Background
After the death of Saw Gerrera, partisan cells across the galaxy went dark. As their numbers dwindled, these cells grew more and more desperate. One cell deep in Wild Space turned to the Lost Treasure of Count Dooku in one desperate gamble: to build a droid army in order to survive and overthrow the empire in the region. Unfortunately, none of the droids still functioned, but in a twist of fate their programming chips were salvageable, so the rebels put some upgraded servos and all the combat subroutine chips they could find (mostly from scrapped commando droid and vulture droid prototypes) into their trusty 2-1B medical droid. "The Doctor" was born: a ruthless hitman with immaculate bedside manner, struggling to make peace between his improperly-scrubbed caring/pacifist programming and his murder-machine subroutines.
Motivation
Expertise: The Doctor is motivated by growing his skillset and acquiring new programming subroutines. Maybe, somewhere out there, there's a job for a droid that he actually likes.
Hatred: The Doctor is the only survivor of his rebel cell, having fought valiantly to defend his friends but eventually, all of them were picked off by the empire sooner or later. As such, the Doctor has spent the last 8 years since the Battle of Jakku finding and exterminating all manner of former Imperial agents.
Memory: Above all else, the Doctor wants to be able to remember his days with Saw Gerrera and the partisans, and before then. His memory is very spotty and hazy due to all the various kludged-together programming under his hood, but every now and then in his travels he'll find something that reminds him of the old days...
Obligations
Oath: Partisans. 2-1Bs are programmed with a strong life-debt for their owners, in the Doctor's case, the partisan insurgents. The Doctor saw his rebel friends hunted down and picked off by the empire, one by one. As the last survivor, he feels an obligation to avenge their deaths and exterminate any surviving former Imperials, especially those who were personally involved in the eradication of the partisans. The Doctor also still holds out hope that some of the partisans survived, and would do whatever he can to help them.
Description
The Doctor suffers from what might be described as split personality disorder. The partisans did not succeed in scrubbing his old, caring, and pacifistic medical droid personality and memories when they implanted him with brutal, cold, calculating, and deadly commando droid subroutines. He struggles to make peace between what he is good at and what he wants to do. However, both sides of his personality have a love of freedom and a burning hatred of the empire. Beneath his quiet and dangerous exterior, perhaps due to vulture droid programming or something else entirely, the Doctor is kind of a "vintage car guy" when it comes to spaceships, and he likes playing Sabacc (even though he always loses) because it reminds him of his partisan buddies.