It is very unlikely, but that comes with MacOS is sometimes very buggy. Often it does not quit safely, and you have to kill it using Activity Monitor. It is especially annoying when it prevents computer from Shutdown. There is one trick, that at least for me - works every time. Before you quit the - turn all accounts offline:

Wait until all accounts move to offline mode (Flash sign at the end of account) and quit

Next time when you start Mail, you should put accounts to online mode, by pressing Shift+Cmd+N (Get New Mail).

Obviously there is some asynchronous function in the application, that refreshes the content of your mail accounts, running in background and prevents application to quit. (for me this came with MacOS Lion release - before I had never experienced such behavior).