Somehow I think Madara collected the juubi so the tree of life could grow and if the flower bloomed, probably the tree would produce the fruit of chakra. If he ate it, he would gain Kaguya's power and that is the final villain. Madara is damn obsessed of the strongest power, afterall. Probably that's why Hagoromo entered Naruto's and Sasuke's mind to combine their power and shared his own power. It would be like the battle between sage+brother vs juubi/kaguya. That's my thought.