You read my mind. I can't see this explained in Apple's official how-to guides. I've asked about this on Reddit and the variety of responses shows people have hugely different understanding of how this works. If you search online for Safari tab arrangement you'll find excerpts highlighting that you can right-click on a tab and choose to arrange your tabs: by title or by window. I'm yet to find an explanation beyond that.
'Arrange by Title'
Does this order tabs (from different sites) alphabetically based on the page title? Based on my testing, it re-arranged the current session tabs alphabetically. For example, imagine you have the following 4 tabs open with the following page titles:
(a) Kagi Search (b) Home – BBC News (c) DuckDuckGo - Privacy Simplified (d) News, Sport and Opinion from The Guardian.
These will be re-ordered alphabetically:
(a) DuckDuckGo - Privacy Simplified (b) Home – BBC News (c) Kagi Search (d) News, Sport and Opinion from The Guardian.
Any subsequent tabs you open from these 'parent' tabs appear at the end of existing tabs from this domain.
'Arrange by Website'
On selection, this re-arranges your session and groups them by domain so, for instance, all open tabs on the BBC are grouped together. Hereafter, the same logic (and I used the word quite wrongly) seems to apply:
Any subsequent tabs you open from these 'parent' tabs appear at the end of existing tabs from this domain.
It's not clear if these settings persist across browsing sessions. Does one have to select this each session? There's also no 'tick' beside your chosen tab preference, so you have no visual clue as to which setting you're using in your session. Besides initially arranging tabs alphabetically, across the two modes, there's no subsequent difference in arrangement behaviour.
Hopeless.
Apple, please, please, please, hire people who are actually suited to development and know about UX.