The license key gets tied to certain system internals upon first use, and is checked against the existence and value of the same internals in subsequent checks. Apparently, toggling UEFI (and/or Secure Boot) modifies one such internal.
EDIT: license -> license key