I think, due to the functional/declarative language that is XQuery, the
static context defines that current-dateTime() doesn't change during the
execution of a single query, it is part of the static context.
It is defined in the dynamic context: https://www.w3.org/TR/xquery-31/#eval_context
[Definition: Current
dateTime. This information represents an implementation-dependent point
in time during the processing of a query, and includes an explicit
timezone. It can be retrieved by the fn:current-dateTime
function.
If invoked multiple times during the execution of a query, this function always returns
the same result.]