... do you know how UUID's are created? ...
AFAIK there are several possible functions that are providing such a capability: In BusyBox there is 'generate_uuid()' (in 'libbb/xfuncs_printf.c'), but I'm pretty sure that it does not play much of a role in TC. AFAIK TC is not using the 'mkfs.ext2' from BusyBox, but the following settings indicates to me that 'mkswap' uses said function:
CONFIG_MKSWAP=y
CONFIG_FEATURE_MKSWAP_UUID=y
OTOH the BusyBox source contains a reference to a
RFC plus some quote from the same, which might be of interest.
As TC uses the EXT2FS library (v1.41.11) for its 'mkfs.ext[2-4]' I have reason to believe that the 'uuid_generate()' function (see link to the
source code) is instrumental in creating the UUID when one creates an EXT[2-4] file system with TC.
For other file systems created with other tools one would have to look for similar functions.