Looking at the official coreutils documentation for join: at
https://www.gnu.org/software/coreutils/manual/html_node/join-invocation.html
The result of the example is incorrect.
It should read:
$ join file1 file2
a 1 X
e 5 Y
If this is the incorrect place to report a documentation bug, please let me
know and point me to the correct place. The introduction of the coreutils
manual does not specify where to send documentation errors.