They appear as empty because Visual Studio Code doesn't understand the concept of not being able to open the file. They're not actually empty, vscode is just literally unable to know whether they are or not.
Windows has the concept of "exclusive open" (aka "share modes", elsewhere also called "mandatory locking"). It is commonly used by database software to prevent another program from writing data at the same time as the database engine is managing it; if two handlers tried to write at once, they could end up corrupting the entire database. The same applies to filesystems – Windows doesn't actually let you access the raw disk device if it is mounted as a filesystem.
(That said, there are database formats specifically made for simultaneous access, such as LMDB.)
But the primary reason Windows Registry uses exclusive open is for security enforcement. Each Registry key can have a set of permissions (DACL/SACL) attached to it, just like a file or folder. If you could directly open a registry hive (especially the system or security hives), you could simply read the data that was supposed to be secured via permissions.
2Of course they are special - they are the heart of Windows. – harrymc – 2019-05-25T17:51:00.280
@harrymc: So is ntoskrnl.exe, but that opens up in Notepad just fine. – user1686 – 2019-05-25T18:43:00.597
1@grawity: Are you looking for homogeneity in Windows permissions? – harrymc – 2019-05-25T19:16:49.003
@harrymc: You did say "of course they're special" as if it should be obvious to the reader, so of course I am. – user1686 – 2019-05-26T10:03:11.837
@grawity: You are destined to be disappointed. – harrymc – 2019-05-26T10:27:14.730