My theory is that Obito transplanted Madara's rinnegan into Nagato after he died, so that later on, when the time is right, Nagato could revive him back. Lawl short and sweet
Okay, you're new so i'm gonna be nice, tbh this isn't much of a theory, next time provide evidence and facts to support your statement, people will be more interested in contributing it then.