In most cases kernel.bootfile is populated from the information
provided by loader(8). There are certain scenarios when loader
is not available, for instance when kernel is loaded by u-boot
or some other BootROM directly. In this case the default value
"/kernel" points to invalid location and breaks certain functinality,
like using installkernel on self-hosted system or dtrace's CTF
lookup. This can be fixed by setting the value manually but I think
changing the default to "/boot/kernel/kernel" is better approach.
Current default was set before 1996, when "/kernel" was the
actual path I guess.
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221550