Even without an MS account, when using Microsoft Store with a local account, I won't be surprised if they used some hardware fingerprint such as MAC address to assign a unique ID to that account.
Source: built a new PC a few weeks ago and naively assumed they'd just give me a product key or ask how I wanted to receive it.