I had to read this paragraph (source) multiple times before I understood what was actually going on.
It explains how the glob !(my)*.txt can match a file named myscript.txt. Because I am familiar with how regex works, I was able to figure out why that happens, but the explanation in that page actually threw me off at first.
Perhaps it can be reworded so that what happens is more instantly clear.