?
expands to all one character files or itself if none exists*
expands to all files or itself if none eixsts
So only way this can happen is if you have a single-character file called 1
in your working directory. e.g.
> mkdir emptydir && cd emptydir
> echo ?
?
> touch 1 && echo ?
1
Also note as comments point out you can print it by doing echo "?"
or echo \?