There was considerable confusion in chat recently about this dialog, and when I looked at it I realized it's misleading if not downright wrong:
It makes it sound like you can enter a user's site ID or site profile URL to add them directly to a chat's ACL, but you can't; the first field expects a chat ID or a chat profile URL. I'm not sure why the second field says "if they have already visited chat.stackexchange.com before" -- both fields have that requirement
The ideal solution would be to change the first field so a site profile link works, automatically creating the chat account if necessary and then adding the chat account to the access list. This also solves the problem of having no good way to find a user's chat account given their site account -- you currently need to search for their display name on chat and page through the results until you spot their gravatar. Since the dialog's text changes when a moderator is looking at it, it seems like this was the intended functionality and it's just not working right
If that's too hard, the dialog should at least be rewritten to clarify that the first field is for chat links only, not site links. It would also be nice if giving it invalid input caused an error; right now it just silently closes the dialog
User.IsModerator
. So it seems like the intended behaviour might be what you're describing, with the additional moderator perk of inviting people who haven't been to chat before, and this is a bug?