If the language can prove the list is not empty, it can elide constructing that “Either” object and optimize away the caller’s error path.
If it can’t (and there will be lots of cases where it won’t be able to, even though it theoretically could), what will it do? Return an incorrect value, abort the program, refuse to run the code, something else?