The llm is not just the personality it's simulating - the model is also predicting tool call outputs, use messages, program outputs, api call responses, etc etc. predicting the next token means it has to have a pretty solid model of all the possible next tokens from everything everywhere