Hagoromo explains to the four Hokage that Naruto and Sasuke are his sons' reincarnations, and that they're battling his mother. So the four can fully understand the situation, Hagoromo explains the origins of Ninshu. After Kaguya was sealed, Hagoromo began wandering the world, to restore the land ravaged by the fight against the Ten-Tails, and to find homes for the tailed beasts.