A lot of the characters in this game are heavily influenced by IRL japanese folklore, and even minor side characters are no exceptions to this. In case of Kaguya and Mr.Bamboo, they’re based on the 9th story in “The Japanese Fairy Book” (1908) by Iwaya Sazanami.

You can read the full story here (translated into English by Yei Theodora Ozaki)