While I'm not sure about why that happened to you, a safer option is usually to use the -t
option to explicitly specify the target directory. There's also, of course, the -n
option to force no-clobber, or -i
for interactive confirmation.
Adding a trailing backslash to the directory name can't hurt either, although I don't know if it has any effect here.
mv -n -t /path/dir2/ dir1