However, you may want to keep state information between function calls.

Think of how the DIR() funcion works. The logic of the function needs to retain state information so that subsequent calls return the next value. Local variables are destroyed and so are not usable in that context.

Ruud has said that there will be static variables which will perform the task but these are not there yet.

You may also need variables which need to be visible between UDFs which make up a function library. Again, these need to be global, at least within the file that the functions are defined.