ELI5: What logic does my browser use to determine which tab to go to after I close the one I'm viewing? It's seriously frustrating.

I'll go through the effort of placing my tabs in a way where it would logically open to the one I want (the one directly to the left of the one I closed), but nope! It's going to skip a bunch of tabs, instead, and make me view some random one I opened 20 hours ago.

Is there some trick or (god forbid for asking this in the wrong section) LPT for setting this up the way I want it?