Joel nailed it on the head. To elaborate a little more, Grievous was an alien military leader/dictator-type figure on his own planet..which was at war with it's neighbor. He was severely injured in a ship crash, thus requiring major medical attention....resulting in cyborg replacement of much of his body (not unlike Anakin/Vader). However, the crash was actually engineered by Separatists for Sidious....and his injuries were not quite serious enough...so his body was further damaged after he was pulled from the crash. He was thus manipul;ated into a position where he had no choice but to accept the cyborg "improvements" to his body in order to survive and protect his people (who were the aggressors). He was already a cunning and ruthless warrior. After his cyborg changes...whatever morals/conscience he had left were stripped from him to make him the perfect warlord to command the Separatist armies. Yet another plot of Sidious' that was set in place shortly before Attack of the Clones.