So Itachi was a spy for Konoha's higher ups.

It seems like he was probably a spy in Akatsuki also for Konoha's higher ups. And i do agree that it would make sense that he was part of Roots. Roots probably knew Madara was alive, and sent Itachi into Akatsuki to track Madara.