Madara said he didn't know how that rock crushed him and he found him lying in the underground passage next to the boulder which leads me to believe it was coincidence.
However, here it says that Madara ordered the Zetsus to bring Obito to the hideout. Furthermore, in the recent chapter Zetsu said that because of Obito's abilities its no wonder why Madara chose him. So my question is how did Madara know Obito has such potential? When and why did Madara choose Obito?