The pattern .* looks like it means “all hidden files”. Whether it also catches . and .. depends on one bash option, and it is worth knowing which way yours is set.
shopt globskipdots
The manual says that with globskipdots set, filename expansion never matches . and .., even if the pattern begins with a dot, and that the option is enabled by default. In a folder with one hidden file called .hid and one called visible, bash 5.2.21 gives this:
echo .*
.hid
shopt globskipdots
globskipdots on
shopt -u globskipdots
echo .*
. .. .hid
With the option switched off, the same pattern returned the two folder entries as well. A command that acts on every match would then be handed . and .. as well, so it is worth knowing which way your shell is set.
Turn it back on with shopt -s globskipdots. Both directions of the switch only affect the current shell session, so put it in your startup file if you want it fixed.
The caveat is portability. The option is documented in the current bash manual and was present in bash 5.2.21; other versions and shells may lack it. A script that has to run in any shell should not depend on it. Using .[!.]* as a pattern is one alternative; in the same folder it prints just .hid. It would miss names that start with two dots, such as ..foo, so it is not a perfect replacement either.
Further reading: Bash reference manual