I heard alot of people saying he got it from the juubi, because he was an uzumaki and the juubi essence is required to activate the rinnegan.. It's just a theory so I'm not sure
<div class="bbWrapper">Wait if the jubi had rinnegan/sharingan but the SO6P already had it what does that mean? So the sage just magically got those eyes? It would make more sense if he got them after the jubi was defeated. Or am I thinking to much about it?</div>
Some believe the Sage was born/acquired it before he fought the Jubi. Others say that he developed the Rinnengan by becoming the Jinchuriki of the Jubi.
However, I personally believe he was quite special beforehand (with massive chakra reserves and whatever else) but unlocked the Rinnengan after sealing the Jubi.