Most likely they had both names in the first/last name field, and an empty last/first name. There’s no good way to determine what should go where in such a case…
Since you said just a few users are affected it’s probably best if you just fix them manually in the admin area.