This whole thread is dedicated to the history of Uchiha Madara.
Most of what is written here is my own theory.
Battle at the Valley of the End
The Conclusion of the battle
Its true that it was heavily implied in the manga that Madara fought Hashirama there just to get the his cells/DNA and gain Rinnegan .. but this is what Tobi told us, NOT Madara and plus Tobi did lie more then once over the course of manga. What Im getting at is this, Madara didnt fight Hashirama over his cells.
This is where my theory starts. I personally dont think the fight was about Senju DNA, at that time Madara had no way or means to figure out the stuff about SOT6P and Juubi bcs the only source of information was the uchiha stone tablet - now if Mangekyo was enough to uncover the whole truth then Itachi and Sasuke would have found out a long time ago, yet they didnt. This means it required Rinnegan to uncover the whole truth .. so how could Madara know that senju and uchiha are 2 halves of the Rikudou and the rest of it if he didnt have the Rinnegan by that time ?
Hope is lost
I think the fight was simple, to over-thrown Hashirama from Hokages seat, or maybe he just wanted to have a final spar to prove who is more worthy.
The fight is over, Madara have lost and is mortaly wounded with a sword pierced through his chest. However, Hashirama shows compassion and understanding towards Madara. They were afterall a very fierce rivals that just like Naruto and Sasuke, can understand each other better by "exchanging fists". Hashirama thus felt sorry/pity for Madara and spared his life by using his cell regeneration jutsu on Madaras wounds. Basically, Hashiramas cells restored Madaras body.
Just remember with how much respect Madara talks each time he mentions Hashirama.
In return for his life, Hashirama told Madara to stay away from shinobi matters, that from that day on he was to be dead and never to re-emerge in Konoha ever again. Possibly, Hashirama may have used talk-no-jutsu on Madara to convince him that he would be a strong leader for Konoha and that he will ensure that peace will last.
As time went by, Madara stayed hidden in the shadows but the peace that Hashirama was fighting for was to be lost. By the time Hashirama died, Madara already lost hope in mankind to maintain peace bcs not even such a fine ninja and charismatic leader like Hashirama couldnt do anything. Then the fated day happened when he awakened Rinnegan on the verge of his death. With such power at his feet, he decided to change the fate of the world that Hashirama longed for, but by his own way. He used Rinnegan on the stone tablet and learned about Juubi and SOT6P and from all this power and information he created the Moon Eye plan.