Normally, the resource names in the Resource Sheet view are listed according to ID number, which initially reflects the order in which you enter the resources. You can temporarily sort the resource list for a special report or for purposes of analysis. You can also sort the list and have Project permanently change the row ID numbers to match the new order.
Permanently changing the ID numbers does not change the unique ID that is assigned when you add a resource.
Never change the order of resource rows by cutting and pasting if you have already assigned resources to tasks. Because cutting deletes the original resource, its assignments are deleted also, and the new resource you paste in will have a new unique ID ...