Just like any operation where parts of a file are read, rearranged and written back.

Every normal HD-defrag tool shows some kind of “warning” like “information may be lost”, and the registry is nothing but a file.