Selecting certain child datablocks also selects the parent (e.g. selecting a pose bone selects the armature). The base was selected, but the outliner tree element was left unselected. The subsequent selection sync would then deselect the parent base because it was not flagged as selected in the outliner.
This led to issues like T74332 where selecting a pose bone in the outliner did not show drivers in the driver editor unless the armature was explicitly added to the selection afterwards.
The solution is to also flag the outliner elements as selected when selecting parent bases.