Eventually the document may contain more than one query or mutation. In this case the queries must be named and operationName should say which one to execute.
Not that useful in real practice, but sometimes while developing it's handy to keep feeding the same file and just change which operation to use.