It's either because Mail won't close or another OSX app (Numbers most recently) that won't close that stops the shutdown/restart process.