You can customize whether or a not a node is also selected in the scene view when it is highlighted in the Node Editor, and vice versa. Right-click the work area to expose its marking menu and select Sync Node Editor/Viewport Selection so that, if you click on a node in the Node Editor, the same node is also selected in the scene view and vice versa. You can also toggle this option on and off using the hotkey c within the Node Editor or by clicking the and icons from the toolbar. indicates that selection is synchronized and indicates that it is not. For more information about marking menus, see Node Editor marking menus.
You can also set this option as a preference via Windows > Settings/Preferences > Preferences > Settings > Node Editor. If you select this option under the Preferences window, the changes are applied the next time you open the Node Editor.