I believe this is the correct behaviour. Looking at info mkdir:
`-p'
`--parents'
Make any missing parent directories for each argument, setting
their file permission bits to the umask modified by `u+wx'. Ignore
existing parent directories, and do not change their file
permission bits.
To set the file permission bits of any newly-created parent
directories to a value that includes `u+wx', you can set the umask
before invoking `mkdir'. For example, if the shell command
`(umask u=rwx,go=rx; mkdir -p P/Q)' creates the parent `P' it sets
the parent's permission bits to `u=rwx,go=rx'. To set a parent's
special mode bits as well, you can invoke `chmod' after `mkdir'.
*Note Directory Setuid and Setgid::, for how the set-user-ID and
set-group-ID bits of newly-created parent directories are
inherited.
So mkdir -p will take the umask value (modified by u+rw
) to create any directories not in the tree, which kind of makes sense if you consider the problem of how you would you address the permissions on parent directories that already exist?
As the excerpt states, you can change the umask before running the command, although it would probably be a lot easier to run a recursive chmod on the parent directory after everything is created.