In one of the panel it looks like the ten tails juubi had the sharingan. Maybe when rikudo sennin became the jinchuuriki and merged with the juubi their techniques kinda merged. The sage's older son didn't inherit the yang chakra to complete the rinnegan therefore he inherited the juubi's eye technique instead and also received its hatred. Maybe that's why madara gave nagato his sharingan, so that nagato can attain the rinnegan through his yang chakra since he is a distant relative of the senju clan. Also, madara didn't give his eyes to a senju becasue they were in konoha, and he prebably didn't know any living senju.