Kaguya was from the moon (or, in some interpretations, the "sky" in a broader context - implying outer space).
The Hyuuga are stranded space aliens and it was the Uzumaki who originally tended to and worshiped the God-Tree. Kaguya was sealed into the moon as part of the conflict that originally stranded the Hyuuga, who fought to bring an end to Kaguya's tyranny along with the Uzumaki.
This was where the Eight Trigrams seal came from - the seal draws upon the knowledge of the energies of the universe (chakra) and the Uzumaki's knowledge of rituals and talismans (which served as conduits for natural energy). This is likely why the Eight Trigrams seal appears upon all who use the Dead Demon Consuming Seal, as it is essentially evoking Kaguya to steal the soul of the target(s) and sealing them within her soul, itself sealed. A poetic end for a woman who became known as the Demon Goddess.
That said, Hagoromo has displayed behavior contrary to every description of either a Taoist or Buddhist sage. He's continually using power to intervene in the natural course of events, he has displayed a massive attachment to the physical world, he correlates power to usefulness (odd that a sage only takes note of his younger son's accomplishments after he's managed to accumulate comparable power to the older son). Even if the power attained was through two different means - it is a fixation upon power.
Creation of All Things is, perhaps, the most questionable action to begin with. The sage accepts the world as-is, and works within the natural cycle to fulfil purpose. Creation of all things is an outright rejection of the natural world. It is the Outer Path of buddhism - the unnatural path, the heretical path, and often a path that is said to be walked by those who nearly attained enlightenment, but ultimately failed to let go of worldly attachments.
In the end - the Sage should be viewed as a manipulative interloper as opposed to a divine saint. He is working towards an end that he has engineered - not the end that should come naturally.
Perhaps in a way the Sage didn't expect - Naruto's symbol, the full moon, represents "Return" in Taoism. Kaguya and Hagoromo inflamed the issue of human suffering by dominating over people and then distributing chakra to them. Naruto represents the return to the state of Yin, a return to a new beginning.