i think nagato tried to collect the tailed beasts to create a weapon (gedo maso) and didn't know about the plan of tobi. He was manipulated by madara to collect them to complete the moon's eye plan without knowing that the tailed beast's force will be used for madara's plan but to use this power...