This is two different parts of the system.
> No you "know" what your name is and you retrieve that information.
The LLM has this (literally - most of it is a key value store). It outputs a probability for all possible next tokens.
> It's infinitely different to rolling a dice and picking a name based on what number comes up
The sampling algorithm running the LLM then does this part, and adds randomness to make it more "creative".
So if you want factual information then don't be so random you skip over the right answer.