The function documentation of xref-find-references says:
Find references to the identifier at point. With prefix argument, prompt for
the identifier.
The Emacs manual (Node: Identifier Search) says:
‘M-?’ finds all the references for the identifier at point. If there’s no
identifier at point, or when invoked with a prefix argument, the command
prompts for the identifier, with completion.
Inconsistent to both, the actual behaviour of xref-find-references and M-? is to
*always* prompt for the identifier from the user (irrespective of whether it is
invoked with or without the prefix-arg). The only way to get the documented
behaviour is by customizing xref-prompt-for-identifier, and there is no way of
discovering this without reading the source code.