If Sasuke hadn't of left Konoha then he wouldn't have been there to help Itachi dispel the Edo Tensei jitsu therefore saving everyones ass.

So Sasuke beating Naruto in that fight was a good thing :D