Itachi Uchiha killed his clan to prevent a civil war in the Hidden Leaf Village.
He was secretly ordered by the village elders and chose to sacrifice his reputation to protect peace.
He spared Sasuke because he wanted him to grow stronger and eventually learn the truth.
