Because it's learned from people saying '$STRING is $N characters' a rough correlation between the token length of $STRING and $N. Given infinite training and depth, it would learn how strings tokenize and resolve the question more accurately, but this is basically it guessing what the inflation of tokens->chars is and missing.