how does links__system_main_menu() work?
Drupal renders the array argument you passed by looking up a suitable theme hook for links__system_main_menu.

The meaning of the argument should be documented in the module that provides the theme hook.