As for the reason the Mahdi went to Ghayba and didn't stay in the open, it's very simple, as a mercy to humanity so as for humanity not to be destroyed.
And surely the path of destruction is the path we are heading.
this idea that Qaim was born long time ago, and God prolongs His life until He rises, contradicts with Quran and Traditions, for the following other reasons:
In the Book Rijal Alkeshi, it is recorded that Imam Reza said,
“…if God wanted to prolong the lifespan of anyone among mankind, due to the needs of the people, God would have prolonged the life of Muhammad, the Messenger of God".
کتابخانه مدرسه فقاهت - رجال الکشی - الشیخ الطوسی
This Hadith has evidence from Quran, since according to verses of Quran, the Prophets who lived before Muhammad died, and in another verse of Quran, He says, God did not give everlasting life to Prophets. In another words, it is contradictory with Quran, if one believes, God prolonged the Age of Qaim, so that He rises later.
Yes, in some verses it may appear, some prophets like Noah had a long life, but, the Quran does not say, every verse is literal. "Some of its verses are Mutishabihat (metaphors and figurative)" 3:7
Also, there is another Tradition as well in Kafi:
abu Basir narrates from abu ‘Abdallah (a.s.) who has said the following:
"Allah sent revelation to ‘Imran saying, "I will grant you a perfect and holy son who would cure the blind and the lepers and bring the dead back to life by Allah, the permission of Allah and I make him a messenger to the israelites." ‘Imran then said it to his wife, Hanna, mother of Mary all about it When she conceive with the baby Mary and she thought to herself that the baby will be a boy. When she give birth to Mary she said, "Lord, I have given birth to a girl and boys are not like girls. A girl can not be a messenger. Allah, the Most Majestic, the Most gracious, has said, "Allah knows to who have you given birth. When Allah, the Most High, granted Jesus to Mary he was the boy promised to ‘Imran. He promised Jesus to ‘Imran. When we would say something about a man from us and that thing would be found in his sons or grand sons then you must not deny it."
The Quranic evidence for this Hadith is in verse 3:36,
“But when she delivered her, she said, "My Lord, I have delivered a female." And Allah was most knowing of what she delivered, "And the male is not like the female…..”
2 in the same Book, Ibrahim ibn ‘Umar al-Yamani narrated from abu ‘Abdallah (a.s.) who has said the following:
"If we would say something about a man and it would not be found in him but it would be found in his sons or his grandsons you must not reject it. It is because Allah does what he wants."
So, according to these Traditions, even if Imams had said that Qaim was to appear in the son of the 11th Imam, but if He is born in later generations (last period of time) He should not be denied.
And in another Tradition from Sadiq, recorded in Bihar:
“It is a great affliction, that their man (the Qaim) appears in young age to them while they expect that he is an old man.”