Every table (relevant to this topic) has a UNIQUE auto-increment field.
vBulletin and XenForo both do.
If you have 5 people register, and you delete 4 of them, the next unique auto incremented number is 6, the next that registers gets 6.
If that's the case in vBulletin and you import a user into xenforo, then the first one is still there, then the next one is unique auto incremented id number 2. not 6. So old 6, becomes new 2.
To customize this to your needs you need to customize the script to say "ignore whatever xenforo already has, import 6 as 6, .." the consequences of this are unknown to me.
a userid means nothing to the end user, their names are still the same.