The high-level command handling code always sets the namespace associated with an operation to the name of the database concatenated with the string "$cmd":
Commands which target a collection, in particular the various CRUD commands, will later overwrite this value to contain a fully qualified namespace such as myDb.myColl. However, if db.currentOp() is executed at the right time, the user might see a string such as myDb.$cmd:
This is a holdover from the legacy OP_QUERY-based commands protocol, in which a command over the myDb database would be issued with the namespace string myDb.$cmd. It is also counter-intuitive to users, who expect this field to always contain the fully-qualified namespace over which their application logically issued the operation. Instead of $cmd, the user should always see the actual collection name.