I have an old Intel iMac (one of the 1st ones). It had the logic board replaced early on. It lost its Serial Number.* It now has “SystemSerialNumb” instead. It does not have a Hardware UUID, does not have the field. It is running 10.4.11.
So maybe Hardware UUID is a Leopard addition. I don’t know whether it can be lost. Likely someone does.
I read somewhere that if you ask, they will keep (restore) your Serial Number during these kinds of repairs. I never had any kind of problem with the machine or its (many) applications afterwards, so it seemed a moot point. Apparently applications use more intense methods. But it might matter for a homemade security method.
Yes, it also fails. There is no UUID. That machine was one of the 1st Intel iMacs. I ordered it just before they announced Intel chips in Macs, and they asked me if I wanted the new (never seen before) Intel verson.
So, after the logic board was replaced, it has that standard text as a “serial number” and was too early for a UUID. But registered software always worked on it, so I didn’t really care.