Itachi was a spy like the others said. Although he believed he needed EMS to surpass him so instead of direct confrontation, he resorted to traps. Facing him head on will probably end up killing him since the rest of Akatsuki would've hunted him down if he somehow did survive.
On Obito's case. Itachi was useful to him by capturing Bijuus and stimulating Sasuke. He also mentioned something about wanting Sasuke's eyes when.he spoke to the Kages.
In other words I believe this was the plan:
Keep Itachi alive until Itachi faces Sasuke. Once it happened Itachi's life will no longer be necessary as he would then speak to Sasuke about the truth about Itachi to awaken his MS. Itachi probably knew this which would be why he set a post-mortem trap to prevent that. Unfortunately, it failed and Sasuke awakened his MS. Obito then sent Sasuke to the summit to have.him overuse his Mangekyou and weaken the Kages as he said to them. Sasuke's light begins to.fade away during that battle and then wants to transplant Itachi's eyes. It does make sense to me.
I could even go as far to say that he might've been trying to acquire the Rinnegan(If EMS is needed for it). Have Sasuke achieve EMS like he did and then transplant Hashi's DNA and done. Although that was before it was revealed that Indra and Ashura=Rinnegan not Uchiha and Senju=Rinnegan.