The problem is that [node_submit()][1] contains the following code.

      if (user_access('administer nodes')) {
        // Populate the "authored by" field.
        if ($account = user_load(array('name' => $node->name))) {
          $node->uid = $account->uid;
        }
        else {
          $node->uid = 0;
        }
      }

When it's not able to load the user object having `$node->name` as username, it sets the user ID to zero.
As you have already set the values for the node object, is useless to pass the node to `node_submit()`; it would be better to just pass it to `node_save()`.

  [1]: http://api.drupal.org/api/drupal/modules--node--node.module/function/node_submit/6