You're probably using one of those shells like
bash and most other POSIX shells that don't report an error when globs don't match any file and instead pass the glob verbatim (unexpanded) to the application (and there happens not to be non-hidden files with a
.log extension in the current directory).
In those shells, you'll find that
instead of an error like:
zsh: no matches found: *.log`
fish: No matches for wildcard '*.log'. See `help expand`.
echo: No match.
So if there's no
.log file in the current directory:
find . -name *.log
Would be the same as
find . -name '*.log'
where a litteral
*.log argument is passed to
Shells where that has been fix are
tcsh and recent versions of
fish (well, in effect it was OK in earlier versions of Unix, but was broken in the Bourne shell in the late 70s and then fixed again in some shells). With
bash, you can use
shopt -s failglob to get the better behaviour.
Note that if there was one
.log file in the current directory (like
file.log, it would become:
find . -name file.log
And if there was more than one (like
file2.log), that would become:
find . -name file1.log file2.log
Which would be an invalid