Actually, he relies this doing was Madara plan on killing Rin.
Madara told him that he was fooled.
Just how do the zetsu told him about Rin & Kakashi at that location, and the ninja were puppets.
Rin did explained to Obito what's happen that Kakashi killed her.
That made Obito to return and to help Kakashi team to destroy Madara / Kaguya.