I'm pretty sure it showed Obito's eye as him using his eye to...I don't know, confuse Kakashi and allow Obito to impale himself. Kakashi probably would have pulled back if he saw Obito trying to lunge himself into his Raikiri, and Obito wanted to show Kakashi he is immortal/badass/stupid as ****. So he used a quick genjutsu to do that. Kakashi has Sharingan also, he would have already seen through the genjutsu if he didn't really stab him. The only genjutsu Kakashi can't see through is Tsukiyomi, and Obito doesn't have that. Plus they have the same eye, I'm sure genjutsu wouldn't last very long at all if they tried it on each other. Which makes my point of him just using it for a split second to impale his crazy self more plausible.