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