The existence of the Infallible Imam is necessary, but it is not necessary for every one to meet him, especially when certain circumstances of danger require him to be away from eyes of the enemies.
Prophets like Prophet Musa (AS) and Prophet Muhammad (SAWA) and Imams like Imam Musa Al-Kadhim (AS) other Imams during jail periods, were in occultation during times of crisis.That did not mean that they were not existing during such periods of occultation. They always had their own ways to guide people even during being away from the public life.
Imam Al-Mahdi (AS) is also in touch with the Ummah through sincere believers who are entitled to meet him and receive his guidance. Imam Al-Mahdi (AS) is in occultation but he is never absent. His guidance to the Ummah is the guarantee of saving Muslim Ummah from going astray.