I was thinking that maybe Kaguya/black Zetsu gave it to him as she foresaw him as a problem in the future.I mean even with this disease he was a major bada** and if it wasn't for this disease then he'd maybe been able to stop Obito which in turn stops Madara from been revived and ultimately...