What does a receptacle tester reading of "Correct" really mean?
We like to call those 3-light testers "magic 8-ball" testers because their legends are often comically wrong and misleading.  The lights are great, though, and are very useful.



Now, many things about mains electrical can be surprising to EEs. It is wired as an isolated system with discrete current returns (not backplaned) because of  the need to avoid overloads and keep currents equal in all cables (so magnetic fields cancel; since it is AC, eddy currents are a big deal). There is also a safety shield called "ground" (not GND) that must never carry current.

To keep the AC voltage on the isolated system from floating, one conductor has an equipotential bond to safety ground. This "grounded conductor" is called neutral.  The bond is in precisely one place and should flow 0 amps.  

So your center yellow measures between hot and neutral.  

The end yellow measures hot to safety ground, which connects back to neutral via the official ground bond. This detector cannot detect an exchanged neutral and ground, but if you have good assembly skill that should be rather unlikely. It also cannot detect a shorted neutral-ground, nor either one bootlegged from the other.

The red lamp connects neutral to ground. You are most likely to see this in a lost ground situation, when H-G and G-N lamps are now in series with each other.  



The GFCI does not interact with ground in any way. It simply compares the current outbound on one conductor to the current returning on the other conductor. The only way currents could not be equal is if something is storing a tremendous number of electrons (cyclotron?), or if current is leaking out of the loop somehow.  

Your tester needs ground to create an alternate route for current to leak into.