That is correct, the current implementation does
- create one timestamped folder for each mailbox in the scope under the targetfolder
- recreate the folder hierarchy for each mailbox under the timestamped folder for that mailbox
regardless of whether there were matching messages found under that mailbox, or under that folder respectively.
You do have the option of excluding certain folders from the result set using the "-ExcludeFolders" option, but this will also mean all messages in these folders will be excluded from your search scope itself (ie) even if there are messages containing the text you are looking for in the excluded folders, the search will not find them.
Conversely, you also have the option of only including certain folders in your search scope, using the "-IncludeFolders" option. You can use this for large-volume searches if you are sure your target messages will be in one (or a small subset) of predefined folders. You will be out of luck however, if the messages have been moved to a customized folder name.
I do see how it could be more efficient to just not create a folder in the result set if there are no matching messages in that folder, and to ignore mailboxes which did not contain any matching messages in the result set, and we will factor this into the suggested improvements to export-mailbox.
For more information about export-mailbox and its options, please check out the following blog post:
http://msexchangeteam.com/archive/2006/11/28/431669.aspx