prison0's hostuuid will get set by the hostid rc script, either after generating it and saving it to /etc/hostid or by simply reading /etc/hostid.
Some things (e.g. arbitrary MAC address generation) may use the hostuuid as a factor in early boot, so providing a way to read /etc/hostid (if it's available) and using it before userland starts up is desirable. The code is written such that the preload doesn't *have* to be /etc/hostid, thus not assuming that there will be newline at the end of the buffer or even the exact shape of the newline. The rest is assumed to be well-formed, under the assumption that the outcome will not be that disastrous as it will get fixed once the hostid rc script fires off.
It doesn't seem necessary at this time to be concerned with kern.hostid.