As you know Ashura's spirit is within Naruto and Indara's is within Sasuke. I think that somehow Kaguya's spirit was within Madara and when he created his will (BZ) he freed Kaguya from his body into her own solid form. But hey who knows? The symbiote is nothing compared to what these shinobi are doing LolEuh... I said SZ not BZ lol and he might not be final villain haha but I think he will play a significant role. Also, How was kaguya part of madara?