Fixing a corrupted OS X Mail structure after an import of mailboxes from the previous system volume
That "ugly" result is not a corruption or mistake, it's the way the Mail folder is structured now.

If you've been messing with its contents, I'd suggest emptying ~/Library/Mail/V2 and starting over again from your original source, re-importing or using Migration Assistant. 

No, I don't know why either.