cd /path/to/dir
(   set -- *\ *
    printf 'd="%s" ; mkdir ./"${d%d%%.doc}"\n' "$@"
) | . /dev/stdin
You can set a subshell's parameters with shell globs and then feed a pipe with printf, and . source the pipe as a script.
And if you want to move the files in each directory:
cd /path/to/dir
(   set -- *\ *
    printf 'f="%s" ; d="${f%%.doc}"
        mkdir ./"$d" ; echo "mv ./\"$f\" ./\"$d\"/\"$f\""\n' "$@"
) | . /dev/stdin
Note: I've intentionally hamstrung the above with echo because I want you test the output before you dive-in.
FIXED - I forgot to use two %percents for printf.
I tested this, by the way:
% printf 'touch ./"%s file.doc"\n' first second third fourth fifth |
    . /dev/stdin
% ls
> fifth file.doc  first file.doc  fourth file.doc  second file.doc  third file.doc
% ( set -- *\ *
    printf 'f="%s" ; d="${f%%.doc}"
    mkdir ./"$d" ; mv ./"$f" ./"$d"\n' "$@"
) | . /dev/stdin
% ls
> fifth file  first file  fourth file  second file  third file
% cd fifth\ file ; ls
> fifth file.doc
 
                