Maybe he had Orochimaru's thoughts.
Maybe he noticed life was too short, that all he'd learned would eventually disappear... Also, all his ideals would disappear as well, So he found a way to stop that... A son, who could carry all his plans and ideals. A son who would avenge him, carry his legacy.
He entrusted him with the Uchiha killing. Also, he told him to give his Rinnegan to Nagato, and gave him the plans of the Moon Eye Plan.
Who better than a son, his own blood, to carry your life legacy?
And as to what happened to him, let's speculate...
Maybe Madara planned it all... maybe he didn't... but I really don't know WHY he didn't just save his son earlier and kill them but...
Maybe he took him, saved him, cured him, implanted Hashirama's DNA to save his other half. Then, when he healed, he started training him, taught him all he knew, then, when he died, he already had everything planned out.
Maybe he isn't even his son. Maybe he just took him, twisted his mind and did all of the above. Let's just see what happens... but this theory feels... safe, according to what has happened lately. I wouldn't hate this if this happened, actually, I would like it... it would be a GREAT storyline, if you think about it.