The main problem that we should fix is the following common case: 1. Start with at least 2 tabs, and select tab 1. 2. Ctrl/Cmd+click a link, or right-click the link and click 'Open Link in New Tab'. 3. With the default settings, the link is opened in a new background tab. 4. Switch the newly created tab. 5. Check out the super cool content on the tab. 6. Close the tab. 7. The tab to the right is selected, instead than the tab from which the link opened. I wrote up a document with pseudocode to describe the improved behavior we want. It will be linked as the bug's related URL above, while it doesn't go out-of-date.
The specific case in comment 0 will be fixed by bug 533232. The extended case of what happens when you do this for multiple tabs (opened without focus) can be dealt with here. FWIW, in the past, we've leaned towards a philosophy of "least surprise" which means that unless we can pick behaviour that matches user expectations, we should do nothing and behave consistently. This led to the behaviour where when a new tab opens with focus, it remembers its parent and returns to it on close, but as soon as focus switches to another tab, we dispose that history. It's not perfect, but it's consistent and predictable.
Check out what Tab Utilities has implemented. On closing the current tab, we can switch to child tabs first if any, then sibling tabs if any, then the parent tab. Tab switching won't lose the parent-child relationship.