Why is my sub-menu not loading in main menu?
Go to /admin/structure/menu/manage/main-menu 
Edit your parent link
Enable "Show as expanded" checkbox
(Repeat the same for all the parent links)
Go to the front page and see the main menu expanded.


Update:

You can use next code to render menu:

 $main_menu = variable_get('menu_main_links_source', 'main-menu');
 $tree = menu_tree($main_menu);
 print render($tree);