We never really gotten to know Shadow's true purpose to himself.think of this way,we players are the ones that control him,his personality.and there are like I think 12 or 13 endings in the game which is nerve wrecking.but its all worth getting so.if you kill G.U.N solders,the black creatures or Robotniks aka eggman army.you are the ones that made him the way he is.but if you unlock that final ending,you'll slightly understand. BTW I'M SAYING THIS FROM MY POV