Scenario 1: You know Metal Sonic was sentient so during your battle you were trying to get to him so he doesn't have to be evil anymore Scenario 2: You found Metal Sonic abandoned and alone so you decided to bring him back in working condition as he seemed confused Scenario 3: Make it up