Creating a Drupal user with user_save doesn't automatically join an existing CiviCRM contact record
The function to synchronize Drupal users and CiviCRM contacts is CRM_Core_BAO_UFMatch::synchronize().

Since you're calling user_save(), CiviCRM's hook_user_insert implementation should get triggered (from user_module_invoke('insert', $edit, $account, $category); in user_save().

CiviCRM's civicrm_user_insert() checks whether it thinks you are on a CiviCRM callback already*, then calls either civicrm_register_data() which will in turn call CRM_Core_BAO_UFMatch::synchronize(), or CRM_Core_BAO_UFMatch::synchronize() directly.

To deal with this you could trace your way through CiviCRM's code (drupal/civicrm.module, drupal/civicrm_user.inc, CRM/Core/BAO/UFMatch.php) and work out which path your code is triggering; ultimately you want to end up with a call to CRM_Core_BAO_UFMatch::synchronize() which passes in the parameters for CiviCRM to correctly match the existing and new data.

You could also just call that function directly from your custom code; that might be less robust as in future you might end up triggering the synchronize call twice ...