I can't be sure without studying the code, but from memory,
Sometimes in a backup you get questions created by a user, when the details of that user are not in the backup file. In that case, on restore, Moodle does something reasonable, which is probably to put in the user id of the person who did the restore.