Hi Ashley Kwan,
You have stumbled upon a classic case of documentation lagging behind the actual system behavior. It is not a bug in the code, but rather an undocumented quirk of how Windows handles registry hives under the hood.
When you execute reg load, the command-line tool eventually passes your request down to the core Windows Win32 APIs (specifically, functions like RegLoadAppKeyW). While the official documentation for reg.exe strictly states the file must exist, the underlying API is actually programmed to automatically create a brand-new, empty hive file if it doesn't find one at the specified path. The reg command simply inherits this native API behavior without explicitly documenting it.
The takeaway for your scripting: Even though you successfully created a file this way, do not rely on it for production .bat files. Because it is undocumented for reg load, Microsoft could silently patch the command-line parser in a future update to strictly enforce the "file must exist" rule, which would immediately break your scripts.
For bulletproof automation, stick to the documented contract: always use reg save to create the hive first, or copy an existing blank template file before attempting to load it.
I hope this clears up the mystery for your debugging session! If this helped answer your question, please click "Accept Answer".
Tracy.