In the fourth Transformers movie, the Age of Extinction, it was shown that the KSI tried to create galvatron with designs from Optimus Prime. They did not have any specimen of the great Autobot leader to use for the development for he was still alive and in hiding. So they turned to what they got, and used Megatron's corpse to create Galvatron and in turn allowed Megatron to live in another body.
So the question is, if they have access to all and every battle scrap from Chicago, why didn't the KSI copied the coding and AI from Sentinel Prime instead of Optimus Prime for maximum similarity to Optimus? After all, they share traits of leadership and bravery, unlike Megatron.