1. IG-88, the human-hating murderbot
IG-88 is a difficult character to describe. Not because his motivations were particularly complicated -- galactic domination and all that -- but because of how the rogue assassin droid came to be. In the official Disney-approved canon, this fish oil supplement on legs appears to be a single entity. But if you dig into the short story Therefore I Am: The Tale of IG-88, you'll get a different story.
In this expanded universe IG-88 isn't just one droid, but four. The first was activated with a 100 percent guaranteed fool-proof obedience program that completely and totally failed. With his newfound sentience, this entity dubbed itself IG-88A and proceeded to annihilate its creators while also activating and programming IG-88s B, C, and D.
Three of the quartet -- A, C, and D -- proceeded to plot the downfall of biological civilization while B acted as a distraction by becoming a bounty hunter. The latter, then, is the one you know from the movie. He's also the same droid that learned about the Empire's plans for the Death Star. IG-88B, thinking a nigh-unstoppable planet-killer might be useful, convinced A to take a look at the battle station.
Fortunately for all organic life their bounty hunting cover put them in competition with the infamous Boba Fett. Well, "competition" is a strong word. The veteran hunter dispatched B on the Cloud City of Bespin, leaving his rusting gears in the scrap-filled bowels of the burg. C and D went to avenge him, and quickly got their non-existent asses handed to them. A was more successful, but only slightly. He uploaded his robot brain into the Death Star all right. Just in time for some farm boy from Tatooine to blow it into stardust.
2. Dengar, the tragic mercenary
As far as bounty hunters go, Dengar was a real renaissance man. Not just a mercenary, the Corellian also known as "Payback" was a skilled mechanic and child superstar among swoop bike racers. He bounced between the professions until he butted heads with another racing prodigy by the name of Han Solo. He challenged his rival for attention to a dangerous and illegal race in the crystal swamps of Agrilat. Like you do.
Han Solo, still kind of a dick at this point, won the competition by jumping in front of Dengar and burning half his face off with a swoop bike engine. This understandably led the latter racer to ever-so-slightly lose his composure and crash into one of the titular crystals.
Rather than become the Niki Lauda of space, an injured Dengar was dropped from the racing circuit entirely. He fell to his backup career: Interstellar bounty hunting. That's when the Empire offered to repair his physical injuries (if not his psychological ones). In typical bureaucratic fashion, his new employers removed all of his emotions save rage, hope, and despair. The rage and despair were so that he would be a more ruthless killer. The hope was so that he believed his service to the Empire would one day free him from the cybernetic diaper he's wearing in The Empire Strikes Back.
After numerous run-ins and alliances with big players in the Star Wars universe -- including Boba Fett and the Sith apprentice Asajj Ventress -- Dengar went into semi-retirement. He got married, removed his implants, and regained his emotions. Though he resurfaced for a taste of the bad old life on occasion, he left the diaper behind.