TOC does not represent correct order of documents and groups
If you make changes to the order of your groups and documents in the Document Manager or the Merge Settings, you may get some unexpected results in the output. By default, your output TOC will be displayed with the titles and order defined in the Document Manager. That is, if you have multiple groups, the TOC book titles will be taken from the group names. However, if you start moving documents and groups around, you may find that the changes are not reflected in the output correctly. The best way to modify the organization and appearance of your table of contents is to use the Merge Settings dialog. From the Format menu, choose Merge Settings...
With the Merge Settings, you can arrange the groups as you'd like them to appear in the output TOC. You can even add upper-level books and then drag-and-drop your existing groups to create a custom TOC hierarchy. You can also define settings such as the top-level window title for the merged helpset, as well as the TOC title that should be displayed for each group (instead of the group name).
When you make changes to the Merge Settings and then save your project, those settings are saved as part of the project file. So, that's why you can get unexpected results if you later start adding, moving, or modifying groups in the Document Manager; the output TOC will be configured as it is defined in the Merge Settings.
If you're still not getting the expected output, try deleting your Data and Output folders, and choose "Regenerate All" from the Project menu.