The same thing happens when you restart openHAB and when you change a .items file.
First OH loads/reloads the Items into memory with an initial value of Undefined/NULL
Then it loads the previous value of the restoreOnStartup configured Items.
They behave exactly the same as if you restarted OH. They get reloaded with an initial value of NULL and then they get set to their last saved value by persistence with restoreOnStartup. There might be a slight difference in that when you reload the .items file other parts of OH are up and running (e.g. Transformation, sitemaps, etc.) which would not be up and running during a restart so as your Items get reloaded, initialized to NULL, and then restored by persistence they generate errors that do not exist when OH starts.
One thing that may trip some users up when migrating to OH 2 is the fact that they are starting over with a clean slate. What often happens as we grow our systems is that the Items we are dealing with will have always had a value so we forget to check for and handle the NULL cases.
Ideally, you should have the following in your .map files:
(replace Unknown with your desired text)
It is always a good idea to think about and write your config to deal with the NULL cases, especially with label and state Transforms.