It try this again in simple terms so you can understand it.
On the bench, is player A. He has 1b as his primary position, and has been assigned LF as a secondary (backup) position.
Starting is LF is player B. He has LF as his primary position, and has been assigned 2b as a secondary (backup) position.
Starting at 2b is player C. He has 2b as his only assigned position.
During the game, player A comes in to pinch hit for player C. When they then take the field, the engine would notice that player A does not have 2b as a listed position, and does notice that he does have LF as a listed position. The engine likewise notes that the current LFer (Player B) has 2b as a listed position. SOOOOOO, instead of leaving player C at 2b (which he does not have listed as an eligibe position), the engine would move player B to 2b and player A to LF.
There is not clairvoyance involved, its simply following a train of logic, which, guess what, computers can do.