In UNIX/Linux, "mv" does one of two things:
- Moves a file or directory from its current location (in one directory) to a new location (in a different directory).
- Renames the file or directory, without moving it to a new location.
In the second case, renaming a directory doesn't create a new directory, it just changes the name of the already-existing directory.
In fact, your example does two different things, depending on whether "folder" exists as a directory already. If it does, mv works as in the first case above, i.e. moves "FOLDER" into the "folder" directory, so it's now "folder/FOLDER". On the other hand, if "folder" doesn't already exist, it just renames FOLDER.
Yes, it can be quite confusing!