But after loading the page, it would automatically 'evaluate' the state list on the output in which it would evaluate to:
[state] - random item from the `state` list -> Utah [state="Utah", geo = "landlock"] -> Utah landlock
With the state = "Utah" in the square brackets, you are overwriting the state list to just have the value Utah in which after you click the randomize button, instead of it using the initial list, it would only just output Utah since it is the value that was assigned to the state variable.
This list would output the state and then set the geo variable to its value. In [geo = "landlocked", ''], the , '' is there to have the square brackets output nothing (or an empty string).
Since all square brackets, after evaluating it, always output the result in the square bracket, like in [state="Utah", geo = "landlock"], the last thing to be evaluated is the geo = "landlock", therefore the engine would output landlock on the page, so to prevent that we add an empty string at the end of the brackets.