The ? character gets interpreted as a wildcard character, matching any single character at that position, e.g.: allxq=puppy, allAq=puppy and so on. A pattern containing a wildcard does not specify a specific file, and so pattern: cannot really cope with a file with such a name.
Given that MacOS seems to allow the creation of such files there does seem to be a need for more sophistication in the file API.