It's both, and the series is explicit about it once all the reveals land.
The emotional side: Itachi loved Sasuke more than the village, more than the clan, more than his own reputation. He tells this to Sasuke directly at the end of the reanimation arc. Killing his little brother was the one order he was never going to follow, no matter what Danzo wanted.
The plan side: Itachi built the rest of his life around that choice. He asked Hiruzen to protect Sasuke, threatened Danzo into leaving him alone, and then deliberately made himself the villain of Sasuke's story — he wanted Sasuke to kill him, avenge the clan as a hero of the Leaf, and come home with clean hands. He even planned to trigger the crow's Kotoamatsukami as insurance.
So the answer is: he spared Sasuke out of love, then weaponized his own crime to give Sasuke a future. The tragedy is that the plan assumed Sasuke would never learn the truth — and Obito told him.