The true reason why the top file or item has the light grey outline, or focus rectangle is because your last action you did to change your selection was a Shift+click on that item. This becomes more readily apparent when [as opposed to clicking on an item and then Shift+clicking on one of the items above that item] you click on an item and then you Shift+click on an item below that item.
Also, when multiple items are included in the selection (a so-called multiselection) it is possible to deselect individual items from the multiselection, i.e. by using Ctrl+click on whatever the item you want to deselect from the multiselection. Conversely, Ctrl+clicking on an item that is not part of a multiselection causes that item to become part of multiselection.
Put simply, Ctrl+click can be used on an item to toggle between whether that item is part of multiselection.
You'll also notice that Ctrl+click on an item causes the focus rectangle to jump to that item. Whereas Shift-click on an item just changes the current selection/multiselection in such a way that it will include 1/ that item and 2/ the item that has the focus (which may or may not be the same as the one that you Shift+clicked on) and 3/ all the items in between (if any), and, the focus will jump to the item that you Shift+clicked on.
In dark mode, as long as the focus hasn't been moved anywhere outside (e.g., by using Tab or Shift+Tab) File Explorer's right pane (or middle pane, if the details pane is visible), any items that neither are selected nor are part of multiselection have a near-black background on them and, additionally, if the item that has the focus is selected or part of multiselection, that item has a darker background [when compared to any times that are selected or part of multiselection but that don't have the focus, or light grey outline]. The latter part of this was a design choice that they made to improve the visible distinction between blue outlines and the light grey outline in a multiselection.
First and foremost, this kind of thing is typical brain food for those who, like me, were born before Microsoft was founded as a company. It keeps brain cells from dying too fast.